Network configuration method and device

ABSTRACT

A network configuration method includes determining an end-to-end latency upper bound of data traffic between two end nodes, determining an end-to-end latency constraint of the data traffic between the two end nodes, determining, based on the end-to-end latency upper bound and the end-to-end latency constraint, for a first network shaper, at least one configuration parameter that satisfies the end-to-end latency constraint, and configuring the first network shaper for the data traffic based on the at least one configuration parameter such that the traffic after being shaped by the shaper satisfies the network latency constraint.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation of U.S. patent application Ser. No. 17/071,639,filed on Oct. 15, 2020, which claims priority to Chinese Patent App. No.201910985050.2, filed on Oct. 16, 2019, both of which are incorporatedby reference.

FIELD

Embodiments of this disclosure relate to the field of communicationstechnologies, and in particular, to a network configuration method anddevice.

BACKGROUND

In an existing network running process, traffic may need to be sentaccording to a user traffic contract signed with a transmit end, toconstrain an average rate and a burst size in traffic sending. However,it is sometimes difficult to send the traffic by 100% or highlycomplying with the user traffic contract. In this case, a networkingress shaper needs to limit inbound traffic at an egress, to ensurethat the inbound traffic satisfies a specific traffic limit. This avoidsnetwork congestion in a traffic transmission process caused by excessivesent traffic, or avoids inappropriate traffic jitter caused by largefluctuation of a data flow transmission rate.

With continuous upgrade of communications technologies, especiallydevelopment of fifth generation (5G) network technologies, some servicescenarios have increasingly strong requirements on high reliability anda low latency. For example, to satisfy a service requirement for 5Gultra-reliable low-latency communication (URLLC), a bearer network needsto provide a bound data plane storage forwarding latency. An existingnetwork shaper is mainly used to limit an average bandwidth of traffic,and an input parameter of the shaper is mainly determined based onrequirements such as the user traffic contract. Parameter setting iscomparatively fixed, or is adjusted through manual intervention onlybased on experience. As a result, the existing network shaper cannotwell satisfy an actual network requirement.

SUMMARY

Embodiments of this disclosure provide a network configuration methodand device such that a shaper parameter is configured based on that datatraffic transmission satisfies a service latency constraint, to ensurethat the traffic transmission better and more flexibly satisfies aservice scenario requirement, and network service quality is improved.

According to a first aspect, an embodiment provides a networkconfiguration method. The method includes determining an end-to-endlatency upper bound of data traffic between two end nodes, determiningan end-to-end latency constraint of the data traffic between the two endnodes, determining, based on the end-to-end latency upper bound and theend-to-end latency constraint, for a first network shaper, at least oneconfiguration parameter that satisfies the end-to-end latencyconstraint, and configuring the first network shaper for the datatraffic based on the at least one configuration parameter.

A shaper parameter is configured based on that data traffic transmissionsatisfies the end-to-end latency constraint, to avoid, as much aspossible, network congestion caused by the data traffic transmission ina network and a packet loss, better adapt to a service scenariorequirement, and improves network service quality.

In an optional design, the end-to-end latency upper bound is representedas a latency upper bound function, and the determining an end-to-endlatency upper bound of data traffic between the two end nodes includesgenerating the latency upper bound function using an arrival curvefunction and a service curve function that are based on a networkcalculus algorithm.

In an optional design, the end-to-end latency upper bound is representedas a latency upper bound function including a first variable, the firstvariable represents a maximum burst size allowed by traffic output bythe first network shaper, and the first variable belongs to the at leastone configuration parameter.

In an optional design, a value of the first variable is calculated undera condition that the end-to-end latency upper bound satisfies theend-to-end latency constraint. Optionally, the first variable representsa maximum burst size allowed by traffic output by the first networkshaper, and the first variable belongs to the at least one configurationparameter. Optionally, a first rate is determined. The first rate is anaverage output rate of the data traffic on the first network shaper, thefirst rate is greater than or equal to an average input rate of the datatraffic and is less than or equal to a minimum value of service rates ofall forwarding nodes between the two end nodes, and the first ratebelongs to the at least one configuration parameter.

The end-to-end latency upper bound in a network, for example, in thenetwork using a time asynchronization-based scheduling policy isdetermined based on the network calculus algorithm, and theconfiguration parameter of the shaper is determined under a conditionthat the end-to-end latency upper bound satisfies the end-to-end latencyconstraint, to avoid the network congestion caused by a latency and thepacket loss.

In an optional design, configuration parameters of one or more secondnetwork shapers respectively corresponding to one or more forwardingnodes between the two end nodes are determined, and the configurationparameters of the one or more second network shapers are the same ascorresponding configuration parameters of the first network shaper suchthat per-hop regulation is performed on the data traffic that flowsthrough the one or more forwarding nodes.

The parameters are configured on the network shapers used for eachforwarding node, to perform the per-hop regulation on each forwardingnode, and avoid, as much as possible, a traffic burst on a forwardingnode, caused by latency accumulation, and the packet loss caused by thecongestion.

In an optional design, a buffer upper bound of the current forwardingnode is determined based on an arrival curve function and a servicecurve function at a previous forwarding node through which the datatraffic flows, and a buffer of the current forwarding node is determinedbased on the buffer upper bound, where the buffer is configured totemporarily store the data traffic in the current forwarding node.

Appropriate buffer space may be configured for each forwarding nodebased on the buffer upper bound determined based on the network calculusalgorithm, to avoid, as much as possible, the congestion caused by thelatency in a traffic transmission process.

In an optional design, the determining, based on the end-to-end latencyupper bound and the end-to-end latency constraint, for the first networkshaper, at least one configuration parameter that satisfies theend-to-end latency constraint includes determining that the end-to-endlatency upper bound satisfies the end-to-end latency constraint, whenthe end-to-end latency upper bound satisfies the end-to-end latencyconstraint, determining a maximum value of all the single-point boundlatencies based on the single-point bound latencies of all theforwarding nodes between the two end nodes, and determining, based onthe maximum value of all the single-point bound latencies, for the firstnetwork shaper, a configuration parameter that satisfies the end-to-endlatency constraint.

In an optional design, the configuration parameter that satisfies theend-to-end latency constraint and that is determined for the firstnetwork shaper is a sending period, and another configurable parameterof the first network shaper further includes at least a maximum quantityof packets that can be sent in the configured sending period and/or amaximum packet length.

A satisfied latency constraint of shaped and output data traffic can bedetermined based on the single-point bound latency of each forwardingnode. A configuration parameter of a network shaper can be configuredaccordingly, to ensure that the data traffic in a network, for example,in the network using a time synchronization-based scheduling policy,satisfies the end-to-end latency, to avoid the congestion in the datatraffic transmission process as much as possible.

According to a second aspect, a network shaper configuration method isapplied to a network using a time asynchronization-based schedulingpolicy. The method includes determining a first end-to-end latencyconstraint of traffic, determining a first end-to-end latency upperbound of the traffic, and determining and configuring, based on thefirst end-to-end latency constraint and the end-to-end latency upperbound of the traffic, at least one configuration parameter for a shapersuch that the traffic after being shaped by the shaper satisfies thefirst end-to-end latency constraint.

The at least one parameter of the network shaper is configured in thenetwork using a time asynchronization-based scheduling algorithm, toensure that the end-to-end latency upper bound of the data traffic in atransmission process satisfies the end-to-end latency constraint, andavoid network congestion caused by a latency and a data packet loss.

In an optional design, a configuration parameter of the shaper may befurther adjusted, and the adjustment includes determining a secondend-to-end latency constraint of the traffic, determining the firstend-to-end latency upper bound of the traffic after being shaped basedon a configuration parameter of a current shaper, determining whetherthe first end-to-end latency upper bound satisfies the second end-to-endlatency constraint, and if determining that the first end-to-end latencyupper bound does not satisfy the second end-to-end latency constraint,adjusting the at least one configuration parameter of the shaper basedon the second end-to-end latency constraint such that a secondend-to-end latency upper bound of the traffic after being shaped by theshaper satisfies the second end-to-end latency constraint.

In the network using the time asynchronization-based schedulingalgorithm, the at least one configuration parameter of the networkshaper can be adjusted and configured based on a change of the traffictransmitted in the shaper, a change of a latency constraint of a sametraffic type, or the like. This ensures that the traffic after beingshaped and output satisfies a new service constraint requirement.

In an optional design, the end-to-end latency upper bound is representedas a latency upper bound function, and the determining an end-to-endlatency upper bound of data traffic between the two end nodes includesgenerating the latency upper bound function using an arrival curvefunction and a service curve function that are based on a networkcalculus algorithm.

In an optional design, the end-to-end latency upper bound is representedas a latency upper bound function including a first variable, the firstvariable represents a maximum burst size allowed by traffic output bythe first network shaper, and the first variable belongs to the at leastone configuration parameter.

In an optional design, a value of the first variable is calculated undera condition that the end-to-end latency upper bound satisfies theend-to-end latency constraint. Optionally, the first variable representsa maximum burst size allowed by traffic output by the first networkshaper, and the first variable belongs to the at least one configurationparameter. Optionally, a first rate is determined. The first rate is anaverage output rate of the data traffic on the first network shaper, thefirst rate is greater than or equal to an average input rate of the datatraffic and is less than or equal to a minimum value of service rates ofall forwarding nodes between the two end nodes, and the first ratebelongs to the at least one configuration parameter.

According to a third aspect, a network shaper configuration method isapplied to a network using a time synchronization-based schedulingpolicy. The method includes determining a first latency constraintrequirement for traffic, and determining at least one configurationparameter of a shaper based on the first latency constraint requirementfor the traffic such that the traffic after being shaped by the shapersatisfies the first latency constraint requirement.

The at least one parameter of the network shaper is configured in thenetwork using a time synchronization-based scheduling algorithm, toensure that an end-to-end latency upper bound of the data traffic in atransmission process satisfies an end-to-end latency constraint, andavoid network congestion caused by a latency and a data packet loss.

In an optional design, a configuration parameter of the shaper may befurther adjusted, and the adjustment includes determining a secondlatency constraint requirement for the traffic, determining a firstlatency by the output traffic after being shaped based on aconfiguration parameter of a current shaper, determining whether thefirst latency satisfies the second latency constraint requirement, andif determining that the first latency does not satisfy the secondlatency constraint requirement, adjusting the at least one configurationparameter of the shaper based on the second latency constraintrequirement such that a second latency of the traffic that being shapedby the shaper satisfies the second latency constraint requirement.

In the network using the time synchronization-based schedulingalgorithm, the at least one configuration parameter of the networkshaper can be adjusted and configured based on a change of the traffictransmitted in the shaper, a change of a single-point bound latency of aforwarding node, or the like. This ensures that the traffic after beingshaped and output satisfies a new service constraint requirement.

In an optional design, the end-to-end latency upper bound is determinedto satisfy the end-to-end latency constraint, when the end-to-endlatency upper bound satisfies the end-to-end latency constraint, amaximum value of all the single-point bound latencies is determinedbased on the single-point bound latencies of all the forwarding nodesbetween the two end nodes, and a configuration parameter that satisfiesthe end-to-end latency constraint is determined for the first networkshaper based on the maximum value of all the single-point boundlatencies.

In an optional design, the configured configuration parameter is asending period.

In an optional design, another configurable parameter further includesat least a maximum quantity of packets that can be sent in theconfigured sending period and/or a maximum packet length.

According to a fourth aspect, a network configuration device includes afirst determining unit configured to determine an end-to-end latencyupper bound of data traffic between two end nodes, a second determiningunit configured to determine an end-to-end latency constraint of thedata traffic between the two end nodes, a parameter determining unitconfigured to determine, based on the end-to-end latency upper bound andthe end-to-end latency constraint, for a first network shaper, at leastone configuration parameter that satisfies the end-to-end latencyconstraint, and a shaper configuration unit configured to configure thefirst network shaper for the data traffic based on the at least oneconfiguration parameter.

In an optional design, the end-to-end latency upper bound is representedas a latency upper bound function, and that the first determining unitdetermines the end-to-end latency upper bound of the data trafficbetween the two end nodes includes generating the latency upper boundfunction using an arrival curve function and a service curve functionthat are based on a network calculus algorithm.

In an optional design, the end-to-end latency upper bound is representedas a latency upper bound function including a first variable, the firstvariable represents a maximum burst size allowed by traffic output bythe first network shaper, and the first variable belongs to the at leastone configuration parameter.

In an optional design, that the parameter determining unit determinesbased on the end-to-end latency upper bound and the end-to-end latencyconstraint, for the first network shaper, the at least one configurationparameter that satisfies the end-to-end latency constraint includescalculating a value of the first variable under a condition that theend-to-end latency upper bound satisfies the end-to-end latencyconstraint.

In an optional design, the parameter determining unit is furtherconfigured to determine a first rate, where the first rate is an averageoutput rate of the data traffic on the first network shaper, the firstrate is greater than or equal to an average input rate of the datatraffic and is less than or equal to a minimum value of service rates ofall forwarding nodes between the two end nodes, and the first ratebelongs to the at least one configuration parameter.

In an optional design, the shaper configuration unit is furtherconfigured to determine configuration parameters of one or more secondnetwork shapers respectively corresponding to one or more forwardingnodes between the two end nodes, where the configuration parameters ofthe one or more second network shapers are the same as correspondingconfiguration parameters of the first network shaper such that per-hopregulation is performed on the data traffic that flows through the oneor more forwarding nodes.

In an optional design, the device further includes a bufferconfiguration unit, and the buffer configuration unit is configured todetermine a buffer upper bound of the current forwarding node based onan arrival curve function and a service curve function at a previousforwarding node through which the data traffic flows, and determine abuffer of the current forwarding node based on the buffer upper bound,where the buffer is configured to temporarily store the data traffic inthe current forwarding node.

In an optional design, that the second determining unit determines theend-to-end latency constraint of the data traffic between the two endnodes includes determining the end-to-end latency upper bound based onsingle-point bound latencies of all forwarding nodes between the two endnodes.

In an optional design, that the parameter determining unit determinesbased on the end-to-end latency upper bound and the end-to-end latencyconstraint, for the first network shaper, the at least one configurationparameter that satisfies the end-to-end latency constraint includesdetermining that the end-to-end latency upper bound satisfies theend-to-end latency constraint, when the end-to-end latency upper boundsatisfies the end-to-end latency constraint, determining a maximum valueof all the single-point bound latencies based on the single-point boundlatencies of all the forwarding nodes between the two end nodes, anddetermining, based on the maximum value of all the single-point boundlatencies, for the first network shaper, a configuration parameter thatsatisfies the end-to-end latency constraint.

In an optional design, the configuration parameter that satisfies theend-to-end latency constraint and that is determined for the firstnetwork shaper is a sending period, and another configuration parameterin the at least one configuration parameter of the first network shaperfurther includes a maximum quantity of packets that can be sent in theconfigured sending period and/or a maximum packet length.

According to a fifth aspect, a network configuration device includes aprocessor and a memory. The memory is configured to store a computerprogram. The processor is configured to invoke the computer programstored in the memory, to perform the method in any possible design ofthe first aspect.

According to a sixth aspect, a computer-readable storage medium or acomputer program product is configured to store a computer program. Thecomputer program is used to perform the method in any possible design ofthe first aspect.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe technical solutions in embodiments more clearly, thefollowing briefly describes accompanying drawings for describing theembodiments.

FIG. 1 is a schematic diagram of a network structure according to anembodiment.

FIG. 2 is a schematic diagram of a network structure for transmittingtraffic according to an embodiment.

FIG. 3 is a schematic diagram of a network calculus model according toan embodiment.

FIG. 4 is a schematic flowchart of a network shaper configuration methodaccording to an embodiment.

FIG. 5A is a schematic flowchart of a network shaper configurationmethod according to an embodiment.

FIG. 5B is a schematic flowchart of a network shaper configurationmethod according to an embodiment.

FIG. 6A is a schematic flowchart of a network shaper configurationmethod according to an embodiment.

FIG. 6B is a schematic flowchart of a network shaper configurationmethod according to an embodiment.

FIG. 7 is a schematic flowchart of a network shaper configuration methodaccording to an embodiment.

FIG. 8 is a schematic flowchart of a network node configuration methodaccording to an embodiment.

FIG. 9 is a schematic flowchart of a network configuration methodaccording to an embodiment.

FIG. 10 is a schematic diagram of a structure of a network configurationdevice according to an embodiment.

FIG. 11 is a schematic diagram of a structure of a network configurationdevice according to an embodiment.

DETAILED DESCRIPTION

The following describes technical solutions in embodiments withreference to accompanying drawings. A network architecture and a servicescenario described in the embodiments are intended to more clearlydescribe the technical solutions in the embodiments, and do notconstitute a limitation on the technical solutions provided in theembodiments. A person of ordinary skill in the art may know that, withevolution of network architectures and emergence of new servicescenarios, the technical solutions provided in the embodiments are alsoapplied to a similar technical problem.

For clearer description, a network structure that can be used toimplement the embodiments is first described, as shown in FIG. 1 . Thenetwork includes a sending unit 102, a receiving unit 103, and one ormore forwarding units 105. The sending unit 102 is configured to senddata traffic at an end, then the traffic may be forwarded in the networkusing a forwarding unit 105, and finally the receiving unit 103 receivesthe traffic at an end. The network may further include an ingress shaper104 and one or more per-hop shapers 106. The ingress shaper 104 isusually configured to shape a single piece of traffic that enters anetwork ingress in a time period or a plurality of pieces of trafficthat have a same forwarding path or a same forwarding target device. Thesingle piece of traffic and the plurality of pieces of traffic may berespectively referred to as a single flow and a multi-flow. Before beingshaped by the ingress shaper 104, the single flow and the multi-flow mayhave a same form, or may have different forms. The one or more per-hopshapers 106 are usually configured to perform per-hop regulation on thesingle flow or the multi-flow before or after a corresponding forwardingunit 105 forwards the single flow or the multi-flow. The multi-flow isformed by converging a plurality of single flows that flow through theforwarding unit 105. Traffic shaping may avoid a congestion packet losscaused by traffic convergence or hop-by-hop transmission of bursttraffic. The network may further include a network control unit 101configured to manage and control one or more of the forwarding units105, the ingress shaper 104, and the per-hop shaper 106 on any networknode in an end-to-end network transmission process. The management andcontrol may include, for example, configuring a shaping parameter of theingress shaper 104, and shaping parameters for the one or more per-hopshapers 106, and allocating and/or the per-hop regulating buffer sizesof the one or more forwarding units 105. In another possible design, inaddition to controlling the foregoing units, the network control unit101 may also control the sending unit 102 and/or the receiving unit 103together, to control and manage traffic sending and receiving.

The network structure is merely a possible implementation form. In somepossible designs, the sending unit 102 and the ingress shaper 104 may beintegrated into a same device, for example, an end sending nodeconfigured to send traffic, the ingress shaper 104 and a firstforwarding unit 105 in a traffic transmission process are integratedinto a same device, for example, a first forwarding node that forwardsthe traffic, or the ingress shaper 104 and the receiving unit 103 areintegrated into a same device, for example, an end receiving nodeconfigured to receive traffic. Likewise, the per-hop shaper 106 and theforwarding unit 105 may also be integrated into a same device. In somecases, the sending unit 102, the ingress shaper 104, the forwarding unit105, and the receiving unit 103 may all be integrated into a samedevice. In this case, the per-hop shaper 106 may not be required, butthe ingress shaper 104 independently completes a shaping operation. Insome possible designs, the network control unit 101 may further controlthe sending unit 102 and the receiving unit 103, and perform controlsuch as shaping parameter configuration and/or buffer allocation on thesending unit 102 and the receiving unit 103. The network control unit101 may be independently deployed, namely, physically independent ofanother controlled functional unit (such as the sending unit 102, theforwarding unit 105, or the ingress shaper 104) in the network. Thenetwork control unit 101 and a functional unit may be further integratedinto a same device, or even be divided into several subunits andarranged on a plurality of devices, as long as corresponding managementand control functions can be logically implemented together.

The network control unit 101, the sending unit 102, the receiving unit103, the forwarding unit 105, the ingress shaper 104, or the per-hopshaper 106 may be implemented in a form of hardware, software, or acombination of software and hardware, may be implemented as anindependent device, for example, may be used as an independent node inthe network, or may be one function module or a combination of aplurality of function modules on a network node. This may be selectedand designed based on a specific scenario requirement. One or more ofthe ingress shaper 104 and the per-hop shaper 106 may perform a sameshaping policy, or may perform different shaping policies. The per-hopshaper 106 may be configured for all the forwarding units 105, may beconfigured for only some forwarding units 105, or may not be configuredfor any forwarding unit 105.

In many service application scenarios, for example, in a 5G URLLCservice scenario, specifically, in an industrial automation scenario, avehicle-mounted network scenario, and the like, a corresponding 5Gbearer network may be required to provide a bound data plane storageforwarding latency. However, an existing network shaper is mainly usedto constrain an average bandwidth of traffic. An input parameter of theshaper is mainly determined based on a requirement such as a usertraffic contract, without considering a forwarding latency status of thedata traffic. In addition, the parameter is set comparatively fixedly,and adjustment cannot be flexibly and adaptively performed based on datatransmission in a network to meet an actual network requirement. Anembodiment provides a bound latency-based network shaper configurationmethod 300, to determine and adjust a shaper parameter, and ensure thata network latency of data traffic after being shaped by a shapersatisfies a service latency constraint.

The shaper at a traffic ingress needs to adapt to a specific networkscheduling policy. The network scheduling policy may be timesynchronization-based, or time asynchronization-based. For example, thetime asynchronization-based network scheduling policy may be quality ofservice (QoS)-based. For the time synchronization-based networkscheduling policy, a set of self-designed mechanism may be usually usedto ensure that traffic transmission in a network has a deterministicbound latency, and a value of the bound latency may be obtained.Therefore, the parameter of the shaper may be determined or adjustedbased on the obtained bound latency value. For the timeasynchronization-based, such as the quality of service-based networkscheduling policy, although a one-way or two-way transmission latency ofInternet Protocol (IP) traffic on a specific path may be obtained in aconventional measurement performance metric manner, a measured latencyis only a measurement result of one time. A latency upper bound of thetraffic is difficult to be measured, and further, a bound latency resultcannot be obtained to adjust the parameter of the shaper. Therefore, alatency service-level agreement (SLA) guarantee cannot be provided. Fora traffic forwarding scenario that requires the bound latency, forexample, when the quality of service-based network scheduling policy isused, an end-to-end latency upper bound from a sending unit to areceiving unit may be calculated based on network calculus, and is usedas a reference indicator for configuring the shaper and satisfying theservice SLA.

FIG. 2 shows a network 200 for transmitting data traffic. The network200 includes sending nodes 201 and 211. Traffic 20 is sent from asending node 201, and is sequentially sent to a receiving node 209 alongforwarding nodes 205 and 207 after being shaped by a shaper 203. Traffic21 is sent from a sending node 211, and is sequentially sent to thereceiving node 209 along forwarding nodes 215, 217, and 219 after beingshaped by a shaper 213. In an embodiment, the sending nodes 201 and 211may respectively include the sending unit 102 shown in FIG. 1 ,forwarding nodes through which the traffic 20 and the traffic 21respectively flow may respectively include the forwarding unit 105 shownin FIG. 1 , and the receiving nodes 209 and 219 may respectively includethe receiving unit 103 shown in FIG. 1 . The shapers 203 and 213 may beimplemented as the ingress shaper 104. Therefore, in this embodiment,for example, a network control node (not shown in the figure) includingthe network control unit 101 shown in FIG. 1 can control shapingparameter configuration of the shaper 203 such that the traffic 20 isshaped on the shaper 203 based on a configured parameter. Likewise, thenetwork control node may also control shaping parameter configuration ofthe shaper 213.

It should be noted that FIG. 2 shows only a possible network structurefor forwarding the traffic. In the network structure, because thesending unit 102, the ingress shaper 104, the plurality of forwardingunits 105, and the receiving unit 103 that are configured to transmitthe traffic 20 are separately located on different network nodes.Therefore, from a perspective of a network node structure, the traffic20 successively completes a forwarding process in a sequence of networknodes 201, 203, 205, 207, and 209. However, in some other possibledesigns, as described above, one or more of the sending unit 102, theingress shaper 104, the one or more forwarding units 105, and thereceiving unit 103 may be located on a same network node. For example,when the sending unit 102 and the ingress shaper 104 both are located onthe sending node 201, two forwarding units 105 are located on theforwarding node 205, and the receiving unit 103 is located on thereceiving node 209, from a perspective of the network node structure,the traffic is forwarded in a sequence of network nodes 201, 205, and209. However, from a perspective of a network unit structure, the twonetwork node structures actually complete an end-to-end trafficforwarding process in a sequence of network units 102, 104, 105 (1), 105(2), and 103. In other words, although structures of entity networknodes that forward the traffic may be different, as long as the trafficis actually forwarded in a sequence along a same network unit structure,end-to-end transmission paths of the traffic are the same.

The network 200 shown in FIG. 2 for transmitting the data traffic isused as an example. Based on a time asynchronization schedulingtechnology and a time synchronization scheduling technology to which theshaper adapt, the bound latency-based ingress shaper configurationmethod at the foregoing two cases, in particular, how to obtain a resultof a bound latency value, is described in detail with reference toingress shaper parameter configuration.

Case 1. The shaper adapts to the time asynchronization-based networkscheduling policy.

Network calculation is a method for calculating an end-to-enddeterministic latency upper bound for a communications network. An upperbound of an input traffic data volume at a network node in any timeperiod T is described as an arrival curve, and is related to factorssuch as a service traffic model and a source-end shaping model. Forexample, a sending period, a maximum burst size, a maximum sending rate,a peak rate, and a maximum packet length may be included. A lower boundof a forwarding capability of a network node in any time period isabstracted as a service curve, and is related to parameters such as ascheduling method used by the node, a device, and network configuration.For example, a device scheduling mechanism, a maximum packet length,and/or a port rate may be included. It is assumed that one piece of datatraffic in a network successively flows through M forwarding nodes. Thecurves α_(n)(t) and β_(n)(t) respectively represent an arrival curve anda service curve of an n^(th) node in the M forwarding nodes, where1≤n≤M, M≥1, t represents any moment in the time period T, and 0<t≤T. Amaximum horizontal distance between the service curve and the arrivalcurve at the n^(th) node in the time period T is a latency upper boundof the traffic sent by the node, and a maximum vertical distance betweenthe service curve and the arrival curve represents a buffer upper boundof the traffic sent by the node, as shown in FIG. 3 .

A method for calculating the end-to-end latency upper bound based on thenetwork calculation is described using end-to-end transmission of thetraffic 20 in the network structure shown in FIG. 2 as an example. Afterthe traffic 20 is sent from the sending node 201, an initial curve forthe traffic 20 that is not shaped is (t). Then, a curve α₁(t) isobtained after the shaped traffic 20 flows through the shaper 203, whereα₁(t) is an arrival curve at the forwarding node 205. A lower bound of adata forwarding capability that can be provided by the forwarding node205 is a service curve β₁(t) at the node. After the traffic 20 flowsinto the forwarding node 205, the forwarding node 205 continues toforward the traffic 20 to the next forwarding node 207. An arrival curvefor the traffic 20 at the forwarding node 207 is α₂(t), and a servicecurve at the forwarding node 207 is β₂(t). The traffic 20 continues tobe forwarded by the forwarding node 207 to the receiving node 209, andan arrival curve for the traffic 20 finally received by the receivingnode 209 is α₃(t).

There are a plurality of methods for calculating the end-to-end trafficlatency upper bound based on a network calculus principle, for example,a separate flow analysis (SFA) method, a pay multiplexing only once(PMOO) analysis method, and a total flow analysis (TFA) method. A mannerused for calculating an arrival curve α_(n)(t) and/or a service curveβ_(n)(t) at each node in different methods may be different. Manners forcalculating the end-to-end flow latency upper bound based on the arrivalcurve and the service curve may also be different in the differentmethods. An end-to-end transmission process of the traffic 20 shown inFIG. 2 is still used as an example. At least the following two methodsmay be used to calculate the end-to-end latency upper bound of thetraffic.

Manner 1. An overall arrival curve α(t) and an overall service curveβ(t) of the end-to-end traffic flowing through all the N (N≥1)forwarding nodes are separately calculated, and a maximum horizontaldistance between α(t) and β(t) is calculated, to determine the latencyupper bound (DB) of the end-to-end traffic.

In the manner, a piece of end-to-end traffic is directly used as anobject. The arrival curve (t) for the piece of traffic is expressed byan arrival curve α₁(t) at a first forwarding node in the network,namely, α(t)=α₁(t). The service curve (t) for the end-to-end traffic isobtained by performing a mini-sum convolution operation on single-pointservice curves β_(n)(t) (n=1, 2, . . . , N) at all forwarding nodes inthe network.

A formula for calculating mini-sum convolution between single-pointservice curves at any two forwarding nodes is first defined as followsβ_(f,g)(t)=(β_(f)⊗β_(g))(t)=inf_{0≤s≤t}(β_(f)((t−s))+β_(g)(s))  Formula(1.1).

At any given moment t, all s∈[0, t] are traversed to solve an infimumvalue of β_(f)((t−s))+β_(g)(s). The calculated infimum value is used asa result of the mini-sum convolution operation (β_(f)⊗β_(g))(t),returned at the moment t. (t) and (t) represent service curve functionsof any two forwarding nodes β_(f) and β_(g). The function is anon-decreasing function. s is an intermediate variable, and may be anyvalue in [0, t]. inf_represents calculating an infimum (infimum). Forexample, inf_{E}(x(E)) represents calculating an infimum of a functionx(E) whose value is in a set E.

Based on the Formula 1.1, for the data traffic flowing through the Nforwarding nodes in the network, single-point service curves of thenodes are respectively β₁(t), β₂(t), . . . , and β_(N)(t). A formula forcalculating the end-to-end service curve β(t) for the data traffic is asfollowsβ_(1,2)(t)=(β₁⊗β₂)(t)=inf_{0≤s≤t}(β₁(t−s)+β₂(s)),β_(1,2,3)(t)=(β_(1,2)⊗β₃)(t)=inf_{0≤s≤t}(β_(1,2)(t−s)+β₃(s))  Formula(1,2),(t)=β_(1,2, . . . ,N)(t)=(β_(1,2, . . . ,(N−1))⊗β_(N))(t)=inf_{0≤s≤t}(β_(1,2 . . . ,(N−1))(t−s)+β_(N)(s)).

For example, for the traffic 20, the arrival curve (t)=α₁(t), and theservice curve β(t)=β₁⊗β₂)(t)=inf_{0≤s≤t} (β₁(t−s)+β₂(s)).

The maximum horizontal distance between (t) and (t) is calculated toobtain the latency upper bound of the traffic 20, namely, DB=Max_Hdis((t), (t)).

Manner 2. Arrival curves α_(n)(t) and service curves β_(n)(t) of theend-to-end traffic flowing through all the N (N≥1) forwarding nodes areseparately calculated, and a maximum horizontal distance betweenα_(n)(t) and β_(n) (t) is calculated, to determine that a latency upperbound db_(n) of the traffic at each forwarding node is Max_Hdis(α_(n)(t), β_(n)(t)). Summation is performed on the latency upper bounddb_(n) of each forwarding node, to obtain that the latency upper boundDB of the end-to-end traffic is SUM(db₁, . . . , db_(n)) throughcalculation, where n=1, 2, . . . , N.

For example, as shown in FIG. 2 , the arrival curve and the servicecurve for the traffic 20 at the forwarding node 205 are respectivelyα₁(t) and β₁(t), and the arrival curve and the service curve for thetraffic 20 at the forwarding node 207 are respectively α₂(t) and β₂(t).Then, a latency upper bound db₁ of the traffic 20 at the forwarding node205 is calculated as Max_Hdis (α₁(t), β₁(t)), and a latency upper bounddb₂ of the traffic 20 on the forwarding node 207 is calculated asMax_Hdis (α₂(t), β₂(t)), to obtain that the end-to-end flow latencyupper bound DB of the traffic 20 is db₁+db₂ through calculationaccordingly.

Similar to the method for calculating the end-to-end latency upper boundof the traffic 20, an end-to-end latency upper bound of the traffic 21in FIG. 2 may also be calculated using Manner 1 or Manner 2. In Manner 1and Manner 2, only the arrival curve and the service curve at eachforwarding node are considered when the arrival curve (t) and theservice curve (t) for the traffic are calculated. For example, for thetraffic 20 in FIG. 2 , when the service curve β(t) is calculated usingManner 1, a convolution operation is performed only on single-pointservice curves at the forwarding nodes 205 and 207 that forward thetraffic 20, namely, β(t)=(β₁⊗β₂)(t), without considering the servicecurve at the receiving node 209. This may be applied to a case in whichthe traffic 20 is terminated at the receiving node 209. For example, thetraffic 20 is forwarded only within an autonomous system (AS) domain tothe receiving node 209 at an edge. This is also applied to a case inwhich although the traffic 20 further needs to be continuously forwardedto another node using the receiving node 209, a previous latency valuedoes not need to be considered for subsequent forwarding of the traffic20. For example, after the traffic 20 is received by the receiving node209, the receiving node 209 continues to forward the traffic 20 to theother node in the network. However, when the traffic 20 is forwarded tothe other node, the previous latency of the traffic 20 does not need tobe accumulated. It should be noted that the foregoing case is merelyused as an example, and does not constitute a specific limitation on ascenario in which the end-to-end latency upper bound is calculated usingManner 1 and Manner 2.

In another embodiment, after the traffic 20 is received by the receivingnode 209, the traffic 20 may further need to be forwarded to anothernode in the network, and the other node needs to obtain a latency upperbound calculation result of a previous hop. For example, the receivingnode 209 is an edge node in an AS domain, and the receiving node 209forwards the received traffic 20 to an edge node in another AS domain. Anetwork control node in the other AS domain performs more accurate andeffective control on transmission quality of a data flow in the ASdomain. A transmission latency of the traffic 20 in the previous ASdomain may need to be accumulated. In this case, when the end-to-endlatency upper bound of the traffic 20 in the AS domain in which thenetwork 200 is located is calculated, a latency of the traffic 20 at thereceiving node 209 needs to be considered. When the latency at thereceiving node 209 is considered, the following Manner 3 or Manner 4 maybe used to calculate the end-to-end latency upper bound of the traffic.

Manner 3. An overall arrival curve α(t) and an overall service curveβ(t) of the end-to-end traffic flowing through all the N (N≥1)forwarding nodes are separately calculated, and a maximum horizontaldistance between α(t) and β(t) is calculated, to determine the latencyupper bound DB of the end-to-end traffic.

In the manner, a piece of end-to-end traffic is directly used as anobject. The arrival curve (t) for the piece of traffic is expressed byan arrival curve α₁(t) at a first forwarding node in the network,namely, α(t)=α₁(t). The service curve (t) for the end-to-end traffic isobtained by performing a mini-sum convolution operation on asingle-point service curve β_(n)(t) (n=1, 2, . . . , N) at the Nforwarding nodes in the network and a single-point service curveβ_(N+1)(t) at a receiving node.

For example, the arrival curve (t) for the traffic 20 is α₁(t), and theservice curve β(t) for the traffic 20 is β_(1, 2, 3)(t)=(β_(1,2)⊗β₃)(t).In other words, when the overall service curve β(t) for the traffic iscalculated, the mini-sum convolution operation is performed onsingle-point service curves at the forwarding node 205, the forwardingnode 207, and the receiving node 209, instead of performing the mini-sumconvolution operation only on the single-point service curves at theforwarding nodes 205 and 207 in Manner 1.

The maximum horizontal distance between (t) and (t) is calculated toobtain the latency upper bound of the traffic 20, namely, DB=Max_Hdis((t), (t)).

Manner 4. An arrival curve α_(n)(t) and a service curve β_(n)(t) (n=1, .. . , N) of the end-to-end traffic flowing through all the N forwardingnodes, and an arrival curve α_((N+1))(t) and a service curveβ_((N+1))(t) at a receiving node are separately calculated. A maximumhorizontal distance between the arrival curve and the service curvecorresponding to each node is separately calculated, to determine thelatency upper bound db_(m) of the traffic at the N forwarding nodes andthe receiving node is Max_Hdis (α_(m)(t), β_(m)(t)) (m=1, . . . , N,N+1). Summation is performed on the latency upper bound of each theforwarding node, to obtain that the latency upper bound DB of theend-to-end traffic is SUM(db₁, . . . , db_(n), db_(n+1)) throughcalculation accordingly.

For example, as shown in FIG. 2 , the arrival curve and the servicecurve for the traffic 20 at the forwarding node 205 are respectivelyα₁(t) and β₁(t), the arrival curve and the service curve for the traffic20 at the forwarding node 207 are respectively α₂(t) and β₂(t), and thearrival curve and the service curve for the traffic 20 at the receivingnode 209 are respectively α₃(t) and β₃(t). Then, a latency upper bounddb₁ of the traffic 20 at the forwarding node 205 is calculated asMax_Hdis (α₁(t), β₁(t)), a latency upper bound db₂ of the traffic 20 atthe forwarding node 207 is calculated as Max_Hdis(α₂(t)−β₂(t)), and alatency upper bound db₃ of the traffic 20 at the receiving node 209 iscalculated as Max_Hdis(α₃(t), β₃(t)), to obtain that the end-to-end flowlatency upper bound DB of the traffic 20 is db₁+db₂+db₃ throughcalculation accordingly.

For the traffic 21 shown in FIG. 2 , any one of Manner 1 to Manner 4 mayalso be used to calculate the end-to-end latency upper bound of thetraffic. It should be noted that, in an embodiment, each network nodemay play different roles or have different forwarding locations whensending different data flows. The played roles include, for example, asending node, a forwarding node, and/or a receiving node. For example,the node 201 is a sending node for the traffic 20, but may play a roleof a forwarding node or a receiving node for other traffic in thenetwork 200. The different forwarding locations indicate that a samenetwork node may be in different forwarding hops when forwarding thedifferent data flows. For example, in FIG. 2 , the forwarding node 207is at a second-hop forwarding location for the traffic 20, and is at athird-hop forwarding location for the traffic 21. Therefore, when thesame network node sends or receives different traffic, arrival curvesand service curves may be different. For example, when forwarding thetraffic 20, the forwarding node 207 is used as the second-hop forwardingnode, and the arrival curve and the service curve are respectively α₂(t)and β₂(t). When forwarding the traffic 21, the forwarding node 207 isused as the third-hop forwarding node, and an arrival curve and aservice curve are respectively α₃′(t) and β₃′(t).

Manner 1 to Manner 4 are merely used as examples. In an embodiment,another method for calculating the end-to-end latency based on thenetwork calculus may also be selected.

Manner 1 to Manner 4 describe methods for calculating the end-to-endlatency of the single flow. In some other cases, a sending node may alsoneed to send a plurality of pieces of traffic of a same form. Theplurality of pieces of traffic are aggregated by the sending node toform one piece of aggregated traffic. After the aggregated trafficaggregated from the plurality of pieces of traffic is shaped by aningress shaper, an arrival curve for the aggregated traffic is anaggregated arrival curve determined based on arrival curves for theplurality of pieces of traffic. For example, an arrival curve for theaggregated traffic that satisfies a linear form and that is shaped at aningress is determined by a sum Σ_(i=1) ^(M)α₁ ^(i)(t) of arrival curvesfor the plurality of pieces of traffic that are of the aggregatedtraffic and that are shaped at the ingress, where M is a quantity ofsingle flows aggregated at the sending node, α₁ ^(i)(t) is an arrivalcurve for a single flow before an i^(th) piece of data is aggregated,and i=1, . . . , M. For a manner for calculating α₁ ^(i)(t), refer tothe foregoing case for the single flow.

For traffic forwarding using a time asynchronization-based networkscheduling policy, an embodiment provides a network shaper configurationmethod 500 that ensures a bound latency. A shaper parameter isconfigured based on a service latency constraint, to ensure that anend-to-end latency upper bound transmitted by traffic determined basedon network calculation satisfies the service latency constraint. Asshown in FIG. 4 , the method 500 includes the following content.

S505. Determine the end-to-end latency constraint DB_Cons of thetraffic.

Network latency constraints DB_Cons of different traffic may bedifferent in a network, and may be related to a service type carried bythe traffic, a transmission rate requirement for the traffic in aspecific time period, or another possible network data transmissionrequirement. In a network using the time asynchronization-based networkscheduling policy, the latency constraint of the traffic is usuallyrelated to the service type carried by the traffic. The differenttraffic may carry different service types. The different service typesmay also have different latency constraints in the network. For thetraffic flowing through the network using the timeasynchronization-based scheduling policy, the latency constraint DB_Consthat the traffic should satisfy may be determined based on a constraintof the network on the service type carried by the traffic. Latencyconstraint values DB_Cons corresponding to the different service typesmay be pre-stored, for example, may be stored in the network controlunit 101, in the sending unit 102, the receiving unit 103, or any otherpossible storage location shown in FIG. 1 , which may be set asrequired. In an embodiment, for the traffic forwarding using the timeasynchronization-based network scheduling policy, the latency constraintDB_Cons of the current traffic may be determined based on a specificnetwork data transmission requirement. In an embodiment, for example,the network latency constraint DB_Cons may be automatically obtained bya network management device based on a correspondence between a servicetype and a latency constraint, or may be manually configured by anetwork administrator.

S510. Determine the end-to-end latency upper bound DB of the traffic.

The end-to-end latency upper bound DB of the traffic is determined basedon a network calculus algorithm. Before the shaper parameter isconfigured, a corresponding latency upper bound expression function maybe determined using an arrival curve function and a service curvefunction that are based on the foregoing various network calculusalgorithms, and is used as an expression of the end-to-end latency upperbound DB. For example, for a manner for determining the expression,refer to any one of Manner 1 to Manner 4 for calculating the end-to-endlatency upper bound based on the network calculus algorithm.

S515. Determine and configure at least one configuration parameter ofthe shaper based on the end-to-end latency constraint DB_Cons and theend-to-end latency upper bound DB of the traffic such that the trafficafter being shaped by the shaper satisfies the end-to-end latencyconstraint DB_Cons.

For traffic transmission using the time asynchronization-based networkscheduling policy, an actual latency of the traffic may be determinedbased on the end-to-end latency upper bound of the traffic. In anexample, ensuring that the traffic satisfies the latency constraintDB_Cons needs to ensure that the end-to-end latency upper bound DB ofthe traffic after being shaped by the ingress shaper does not exceed thelatency constraint DB_Cons. Therefore, it may be considered that thelatency constraint DB_Cons is used as a calculation result of theend-to-end latency upper bound DB of the traffic, and a relatedparameter configuration of the ingress shaper is determined withreference to a calculation formula of the end-to-end latency upper boundof the traffic.

The end-to-end latency upper bound after shaping is performed at aningress can be calculated based on a network calculation method. Theshaper shapes the traffic at the ingress such that output traffic afterbeing shaped satisfies an initial curve (t). A specific form of (t) maybe determined by a shaper model used at the ingress. An ingress shaperadapted to the time asynchronization-based network scheduling policyuses, for example, a token bucket model, which includes a single-bucketmodel, a dual-bucket model, or the like. For example, the token bucketmodel may use a strict priority (SP) algorithm, a round robin (RR)algorithm, a weighted fair queuing (WFQ) algorithm, a credit-basedshaper (CBS) defined in the Institute of Electrical and ElectronicsEngineers (IEEE) 802.1 Qav, and the like. In an embodiment, anothershaping algorithm adapted to the time asynchronization-based networkscheduling policy may also be selected as required.

The initial curve (t) after the shaping is performed at the ingress mayinclude one or more configurable parameters. A specific quantity andmeanings of the parameters may be determined based on a model typeselected by the shaper. A parameter set S={s₁, s₂, . . . s_(n), n≥1} ofthe shaper is defined. All or some parameters in the parameter set S maybe determined and configured based on the latency constraint DB_Cons.Under a condition that the end-to-end latency upper bound DB of thetraffic after being shaped by a specific shaper model satisfies thelatency constraint DB_Cons, for example, under a condition that aconstraint DB≤DB_Cons is satisfied, values of the all or some parametersin the parameter set S of the specific shaper model are determined. Inorder to determine a parameter value of the specific shaper model whenthe constraint DB≤DB_Cons is satisfied, the expression of the end-to-endlatency upper bound DB of the traffic in the specific shaper model needsto be determined based on the network calculus. In some cases, theinitial curve (t) may be used as a single-point arrival curve at a firstforwarding node that receives the traffic. FIG. 2 is still used as anexample. The traffic 20 sent from the sending node 201 enters the shaper203 at the ingress. The sending node 201 includes the sending unit 102shown in FIG. 1 , and is configured to send the traffic 20 from thesending node 201. The initial curve (t) for the traffic 20 is asingle-point arrival curve α₁(t) at the first forwarding node 205 thatreceives the traffic, namely, satisfies α₁(t)=σ(t). In another possiblecase, a single-point arrival curve α₁(t) at the first forwarding node205 is not the same as the initial curve σ(t), but may have a specificassociation relationship. In some cases, according to a sequence inwhich the traffic flows, a single-point arrival curve at eachpost-network node may be associated with an initial curve after theshaping is performed and a single-point arrival curve at eachpre-network node. For example, a single-point arrival curve α₃(t) forthe traffic 20 at the receiving node 209 may be associated with theinitial curve σ(t), the single-point arrival curve α₁(t) at theforwarding node 205, and a single-point arrival curve α₂(t) at theforwarding node 207. A single-point service curve at each network nodethrough which the traffic flows may be related to a service capabilitythat can be provided by the node, and may be affected by factors such asa node port bandwidth and a scheduling policy of the node. The describedfactors that affect the single-point arrival curve and the service curveat the network node are only examples. A specific calculation method canbe selected or adjusted as required, as long as an arrival curve and aservice curve at a required network node can be appropriatelydetermined, to obtain the end-to-end latency upper bound of the trafficthrough calculation.

In a possible embodiment, Manner 1 or Manner 3 may be used to determinethe expression of the end-to-end latency upper bound of the traffic. Inthis case, the flow latency upper bound of the traffic is as follows

$\begin{matrix}{{DB} = {{{{Max\_}{Hdis}}\left( {{\alpha(t)},{\beta(t)}} \right)} = {{\underset{t}{Max}\left( {{u:{\alpha(t)}} = {\beta\left( {t + u} \right)}} \right)}.}}} & {{Formula}\mspace{14mu}(1.3)}\end{matrix}$

In the formula,

$\underset{t}{Max}\left( {{u:{\alpha(t)}} = {\beta\left( {t + u} \right)}} \right)$is specific expansion for calculating the end-to-end latency upper boundMax_Hdis(α(t), β(t)) based on the arrival curve (t) and the servicecurve (t) for the traffic. The expansion represents traversing all timepoints t within a specific time period, obtaining a parameter u at eachtime point t to satisfy an equation α(t)=β(t+u), and obtaining a maximumvalue of all parameters u as the latency upper bound DB.

One or more parameters of the ingress shaper are determined based on theconstraint DB≤DB_Cons and are configured such that the shaper shapes thetraffic based on a determined configuration parameter value, therebysatisfying the latency constraint DB_Cons of the traffic. In a possibledesign, all parameters of the shaper are determined based on the latencyconstraint DB_Cons. Alternatively, only some parameters of the shapermay be determined based on the latency constraint DB_Cons, and aremaining parameter of the shaper may be preset, or determined based onanother condition, for example, determined based on a basic servicerequirement, and/or determined based on another performance indicatorexcept the latency of a forwarding node through which the traffic flows.

In some cases, for example, when the service type carried by the trafficflowing into the shaper changes, or although the service type carried bythe traffic does not change, a latency requirement for a same servicetype changes, the latency constraint that the traffic needs to satisfymay change. As a result, for example, after the shaping is performedbased on the configuration parameter determined using the method 500,the end-to-end latency upper bound of the traffic no longer satisfies anew service latency constraint. In another embodiment, when finding thatthe end-to-end latency upper bound of the traffic after being shapedbased on a current configuration parameter no longer satisfies theservice latency constraint, a network control node may further adjustthe one or more of the configuration parameters of the ingress shapersuch that the end-to-end latency upper bound of the traffic after beingshaped based on an adjusted configuration parameter can satisfy theservice latency constraint. A method 600 for adjusting a configurationparameter of the shaper includes the following content, as shown in FIG.5A.

S605. Determine an end-to-end latency constraint DB_Cons' of traffic.

It is assumed that a redetermined latency constraint of the traffic isDB_Cons′. Because DB>DB_Cons′, the end-to-end latency upper bound of thetraffic after being shaped based on the current configuration parameterdoes not satisfy the new latency constraint requirement. Alternatively,in some cases, although the latency constraint DB_Cons corresponding tothe traffic does not change, expected latency constraint satisfactionchanges. For example, the current end-to-end latency upper bound valueDB of the traffic is ⅘ of the latency constraint value DB_Cons, namely,DB=0.8×DB_Cons. However, the network control node expects to furtheroptimize the end-to-end latency of the traffic. Actually, DB=0.6×DB_Consis satisfied. In this case, the parameter of the shaper still needs tobe adjusted, to satisfy the actual requirement for the traffictransmission and ensure a high-quality network service capability. In apossible design, the configuration parameter may also be adjusted on abasis of satisfying a basic latency constraint, for example, adjustedfrom DB=0.6×DB_Cons to DB=0.8×DB_Cons such that the latency upper boundvalue of the traffic after being shaped is at least closer to thelatency constraint value DB_Cons than that before the adjustment. Thissaves a bandwidth while network service quality is ensured, to transmithigher-priority service traffic. Dissatisfaction of the latencyconstraint is caused in the foregoing situations, and the configurationparameters of the shaper need to be adjusted. For ease of description,DB_Cons′ is uniformly used herein to indicate the new latency constraintthat the traffic should actually satisfy. For example, when furtheroptimization is expected for latency constraint satisfaction on apremise that the basic latency constraint DB_Cons is satisfied, the newlatency constraint DB_Cons′ that actually should be satisfied may bedetermined as 0.6×DB_Cons.

The foregoing case is merely used as an example. In an embodiment, thelatency constraint of the traffic may be re-determined according toanother requirement or a preset rule.

S610. Determine a first end-to-end latency upper bound DB₁ of thetraffic after being shaped based on the configuration parameter of thecurrent shaper.

FIG. 2 is still used as an example, the traffic 20 sent from the sendingnode 201 enters the ingress shaper 203. The shaper 203 shapes thetraffic at the ingress based on a determined configuration parameter setS₁ of the current shaper such that output traffic 20 after being shapedsatisfies the initial curve σ₁(t). For the ingress shaper adapted to thetime asynchronization-based network scheduling policy, the firstend-to-end latency upper bound DB₁ of the traffic after being shaped isdetermined based on the network calculus. For example, the end-to-endlatency upper bound of the traffic may be calculated using any one ofManner 1 to Manner 4. A method for calculating the end-to-end latencyupper bound of the traffic may be fixed in a specific network. Forexample, a network calculation expression for calculating the latencyupper bound DB₁ may be the same as a corresponding expression in thestep S520, to ensure stability of service transmission of the networktraffic.

In a possible design, when the latency upper bound of the traffic iscalculated, results of single-point arrival curves and service curvesthat are at one or more network nodes through which the traffic flowsand that are determined in a calculation process may be stored together.It should be noted that, calculation results of single-point curves atwhich network nodes are stored, and whether both a single-point arrivalcurve and a service curve or only one of a single-point arrival curveand a service curve is selected to store may be flexibly set asrequired. This is not specifically limited herein.

S615. Determine whether the first latency upper bound DB₁ satisfies thelatency constraint DB_Cons′, for example, DB₁ DB_Cons′, and if the firstlatency upper bound DB₁ does not satisfy the latency constraintDB_Cons′, step S620 is performed, or if the first latency upper boundDB₁ satisfies the latency constraint DB_Cons′, the method ends.

Determining whether the latency upper bound DB₁ determined in the stepS610 satisfies the new service latency constraint is determining whetherthe condition DB₁≤DB_Cons′ is satisfied. If the condition isunsatisfied, for example, if the flow latency upper bound DB₁ of thetraffic 20 after being shaped based on the current parameter set S₁ ofthe shaper 203 is greater than the latency constraint value DB_Cons′, itindicates that the traffic after being shaped based on the parameter ofthe current shaper does not satisfy the service latency requirement. Thenetwork service quality is affected. In this case, reshaping needs to beperformed on the traffic 20 such that the end-to-end latency upper boundof the traffic 20 can satisfy the new service latency constraint, forexample, satisfy DB₁≤DB_Cons′. In this way, transmission of the traffic20 is ensured to better adapt to a service scenario requirement. When itis determined that the reshaping needs to be performed on the traffic20, the step S620 continues to be performed. When the flow latency upperbound of the traffic 20 satisfies DB₁≤DB_Cons′, no adjustment may bemade in this case, to ensure transmission stability of the data flow.

S620. Adjust at least one configuration parameter of the shaper based onthe latency constraint DB_Cons′ such that a second end-to-end latencyupper bound DB₂ of the traffic after being shaped by the shapersatisfies the end-to-end latency constraint DB_Cons′, namely,DB₂≤DB_Cons′.

In the step S620, a manner of determining and adjusting one or moreconfiguration parameters of the shaper based on the redetermined latencyconstraint DB_Cons′ of the traffic is similar to the parameterconfiguration manner in the step S510. Details are not described hereinagain. It should be noted that, when an operation of adjusting aparameter set of the shaper is performed, any group of parameter set S₁′that can satisfy a constraint DB₂≤DB_Cons′ usually needs to bedetermined. The operation may be implemented by adjusting one or moreshaping parameters in the parameter set S₁ of the shaper 203. A newadjusted parameter set is denoted as S₁′. However, in some cases, forexample, when the further optimization is expected for the latencyconstraint satisfaction on the premise that the basic latency constraintDB_Cons is satisfied, a group of parameter set S₁′ may be directlydetermined in an ideal case such that DB₂=DB_Cons′. Alternatively, agroup of parameter set S₁′ is determined such that DB₂ can be theclosest to or at least closer to DB_Cons′ on a premise that DB₂ is lessthan DB_Cons′. In this case, the traffic after being shaped based on theadjusted shaper parameter set S₁′ conforms to a shaping curve σ′(t),where σ′(t)≠σ(t).

If there are a plurality of shaper parameters that can be adjusted basedon the latency constraint DB_Cons′, all or some of the parameters may beadjusted based on a parameter meaning, a service scenario, and the like.Alternatively, one or more of the parameters may be first adjusted basedon an adjustment difficulty, and if the latency constraint still cannotbe satisfied, a plurality of other parameters are adjusted. A specificadjustment principle of the shaper parameter and a quantity of theadjusted shaper parameters can be set based on an actual requirement. Ina possible design, on a basis that the one or more of the shaperparameters are adjusted based on the latency constraint, anotherparameter of the shaper may be further optimized based on anotherpossible performance indicator of the network, for example, a forwardingcapability of the forwarding node.

To describe a possible implementation more clearly, the followingdescribes in detail an adjustment method shown in FIG. 5B based on acase in which if the service latency constraint is unsatisfied, aconfiguration parameter using a single-bucket shaper model needs to beadjusted. The single-bucket shaper model adapts to the timeasynchronization-based network scheduling policy. The method 600′includes the following content, as shown in FIG. 5B.

S605′. Determine an end-to-end latency constraint DB_Cons′ of traffic.

FIG. 2 is still used as an example, and a network control node may beused to determine the latency constraint DB_Cons′ of a service typecarried by the traffic 20. Because a service type carried by pre-inputtraffic is different from the service type carried by the traffic 20,the latency constraint DB_Cons′ corresponding to the traffic 20 needs tobe re-determined.

S610′. Shape the traffic by the single-bucket model shaper, anddetermine a first end-to-end latency upper bound DB₁ of the trafficafter being shaped based on a configuration parameter of a currentshaper.

The single-bucket model shaper 203 satisfies a shaping functionσ(t)=b+rt, where a parameter b represents a maximum burst size allowedby traffic output by the shaper, namely, a depth of a token bucket, anda parameter r represents an average rate of the traffic output by theshaper, namely, a token supplementary rate. At the beginning, thetraffic 20 after being shaped by the single-bucket model shapersatisfies (t)=b₀+r₀t, namely, an initial configuration parameter set S₁of the shaper is {₀, r₀}. The end-to-end latency upper bound of thetraffic 20 is calculated using Manner 1, and the initial curve α(t) forthe traffic 20 is set to be the single-point arrival curve α₁(t) at thefirst forwarding node 205 that receives the traffic. Therefore, thearrival curve (t) for the traffic is α₁(t)=σ(t)=b₀+r₀t. The servicecurve β₁(t) at the forwarding node 205 is R₁(t−T₁), and the servicecurve β₂(t) at the forwarding node 207 is R₂(t−T₂), where R₁ and R₂represent service rates, and T₁ and T₂ represent waiting latencies ofthe traffic at the node. Therefore, an expression of the end-to-endservice curve for the traffic 20 may be obtained asβ(t)=β_(1, 2)(t)=(β₁⊗β₂)(t)=inf_{0≤s≤t} (β₁(t−s)+β₂(s))=inf_(R₁,R₂)(t−T₁−T₂). Therefore, the first end-to-end latency upper bound DB₁ ofthe traffic 20 is

${{{Max\_}{Hdis}}\left( {{\alpha(t)},{\beta(t)}} \right)} = {{\underset{t}{Max}\left( {{u:{\alpha(t)}} = {\beta\left( {t + u} \right)}} \right)} = {\frac{b0}{\min\left( {R_{1},R_{2}} \right)} + T_{1} + {T_{2}.}}}$

S615′. Determine whether the first latency upper bound DB₁ satisfies thelatency constraint DB_Cons′, for example, DB₁≤DB_Cons′, and if the firstlatency upper bound DB₁ does not satisfy the latency constraintDB_Cons′, step S620′ is performed, or if the first latency upper boundDB₁ satisfies the latency constraint DB_Cons′, the method ends.

If the latency constraint of the traffic 20 is DB_Cons′, and the firstend-to-end latency upper bound DB₁ is determined to be greater thanDB_Cons′, the step S620′ continues to be performed.

S620′. Determine and adjust at least one configuration parameter of thesingle-bucket model shaper based on the end-to-end bound latencyconstraint DB_Cons′ such that a second end-to-end latency upper boundDB₂ of the traffic after being shaped by the shaper satisfiesDB₂≤DB_Cons′.

To satisfy a service latency requirement, the second end-to-end latencyupper bound DB₂ needs to be re-determined such that

${{DB}_{2} = {{\frac{b}{\min\left( {R_{1},R_{2}} \right)} + T_{1} + T_{2}} \leq {{DB}\_{Cons}}^{\prime}}},$as long as a configuration parameter of the ingress shaper 203 satisfy aconstraint b≤(DB_Cons′−T₁−T₂)×min(R₁, R₂) in this case. Any value of aparameter b is determined to satisfy the constraint. A value b1 of bsatisfying the constraint is configured as an adjusted parameter valueto the ingress shaper 203 such that the end-to-end latency of thetraffic 20 after being shaped at the ingress according to (t)=b₁+r₀tsatisfies the constraint DB_Cons′.

In a possible design, a value of a parameter r1 may be further adjustedbased on a forwarding capability of each forwarding node such that thevalue satisfies a constraint R₀≤r1≤min(R₁, R₂). In other words, anaverage output rate of the traffic after being shaped at the ingress isgreater than an average input rate of the traffic before being shaped,and does not exceed a minimum value of service rates of the forwardingnodes such that the traffic after being shaped complies with an actualforwarding capability of a forwarding path for corresponding traffic. Ina specific implementation, when an initial value r0 of a parameter r isless than min(R₁, R₂), a value of the parameter r may be increased on apremise that a constraint R₀≤r≤min(R₁, R₂) is satisfied, to fully usethe service forwarding capability of each forwarding node as much aspossible, and improve service quality of a network service. When theinitial value r0 of the parameter r is greater than min(R₁, R₂), thevalue of the parameter r is decreased such that traffic output at theingress does not exceed the service capability of each forwarding node,thereby reducing congestion and a packet loss rate as much as possible.

When all the parameters of the single-bucket shaper are adjusted at thesame time, a configuration parameter set S1′ of the adjustedsingle-bucket shaper is {b₁, r₁}. A parameter b₁ is adjusted based onthe latency constraint DB_Cons′. A parameter r₁ may be adjusted based ona specific network requirement on a premise that the service forwardingcapability of the forwarding node does not exceed.

Case 2. The shaper adapts to the time synchronization-based networkscheduling policy.

For traffic forwarding using the time synchronization-based networkscheduling policy, an embodiment provides a network shaper configurationmethod 700 that ensures a bound latency. A transmitted end-to-end boundlatency of traffic in a network is determined based on a networkscheduling policy complied with each forwarding node through which thetraffic flows. A parameter of a shaper is configured based on a value ofthe end-to-end bound latency of the traffic such that transmission ofthe traffic satisfies a network latency constraint. As shown in FIG. 6A,the method 700 includes the following content.

S705. Determine a latency constraint requirement DB_Dmd of traffic.

Different from a network using a time asynchronization-based schedulingpolicy, a network using a time synchronization-based scheduling policycan ensure a single-point forwarding latency bound of the traffic ateach forwarding node. Therefore, although end-to-end latency constraintsDB_Cons of different traffic are also related to service types carriedby the different traffic in the network, to ensure that the traffic isreliably transmitted without exceeding an actual forwarding capabilityof each forwarding node, after the traffic is shaped and output by theingress shaper, the corresponding latency constraint requirement DB_Dmdshould be actually satisfied. The latency constraint requirement DB_Dmdis used to ensure that after the traffic is shaped and output, thetraffic flows through each forwarding node in the network, withoutexceeding the actual forwarding capability of each forwarding node suchthat no network congestion or a packet loss is caused. Therefore, thelatency constraint requirement DB_Dmd is usually determined based on thesingle-point bound latency of each forwarding node through which thetraffic flows in the network using the time synchronization-basedscheduling policy. It is assumed that the traffic flows through nforwarding nodes in total on a transmission path, where a single-pointbound latency of an r^(th) (1≤r≤n) forwarding node is db_(r). In ageneral case, all forwarding nodes comply with a same network schedulingpolicy. In other words, single-point bound latencies db_(r) of all theforwarding nodes are the same. In this case, the latency constraintrequirement DB_Dmd of the traffic may be the single-point bound latencydb_(r) of the forwarding node. In another possible case, one or more ofthe forwarding nodes and the ingress shaper may comply with differenttime synchronization-based network scheduling policies. Alternatively, aplurality of forwarding nodes may comply with different timesynchronization-based network scheduling policies. Because thesingle-point forwarding latency bound of the traffic at each forwardingnode may be implemented, a single-point bound latency db_(r) at eachforwarding node using a network scheduling policy can be obtained.db_(r) values of forwarding nodes that use different network schedulingpolicies may be different. Even if a plurality of forwarding nodes use asame network scheduling policy, scheduling control parameters configuredfor the plurality of forwarding nodes may also be different. As aresult, db_(r) values of the plurality of forwarding nodes may also bedifferent. For the network using the time synchronization-basedscheduling policy, the latency constraint requirement DB_Dmd that thetraffic needs to satisfy may be determined based on a maximum value ofthe single-point bound latencies of all the forwarding nodes throughwhich the traffic flows. Specifically, that the traffic flows throughthe n forwarding nodes is still used as an example. db_(max)=max_{db1, .. . , +db_(n), n≥1}, where db_(max) is a maximum value of single-pointbound latencies of all the n forwarding nodes through which the trafficflows. In this case, the latency constraint requirement DB_Dmd of thetraffic is db_(max), to ensure that congestion does not occur eventhough the traffic is at a forwarding node with a maximum single-pointlatency, and the traffic is reliably transmitted on the entireforwarding path.

The end-to-end transmission of the traffic 20 in the network structureshown in FIG. 2 is still used as an example. After being shaped by theingress shaper 203, the traffic 20 from the sending node 201 is sent tothe receiving node 209 after successively flowing through the forwardingnodes 205 and 207. For example, when the forwarding nodes 205 and 207use a same scheduling policy and have a same single-point latency, theend-to-end latency constraint requirement DB_Dmd of the traffic 20 isdb₁=db₂. When single-point latencies of the forwarding nodes 205 and 207are different, for example, when a single-point latency of theforwarding node 205 is 3 seconds (s), and a single-point latency of theforwarding node 207 is 1 s, the latency constraint requirement satisfiedby the traffic 20 should be not less than db_(max)=max_{1 s, 3 s}=3 s,to ensure that the congestion does not occur when the traffic is at theforwarding node 205 with a larger forwarding latency.

S710. Determine at least one configuration parameter of the shaper basedon the latency constraint requirement DB_Dmd of the traffic such thatthe traffic after being shaped by the shaper satisfies the latencyconstraint requirement DB_Dmd.

For the network using the time asynchronization-based scheduling policy,a latency constraint on a piece of traffic is determined based on alatency requirement for the traffic from a network or a user, forexample, may be determined based on a latency required by a servicecarried by the traffic. In addition, each forwarding node on atransmission path of the traffic does not have a preset single-pointlatency constraint. Therefore, in the network that complies with thetime asynchronization scheduling policy, that the traffic after beingshaped by a shaper satisfies the latency constraint is embodied asensuring that the end-to-end latency upper bound DB of the traffic afterbeing shaped by the ingress shaper is not greater than the latencyconstraint DB_Cons of the traffic, namely, DB≤DB_Cons, to ensure thatend-to-end transmission of the traffic satisfies a latency requirementfor the service carried by the traffic in the network.

However, different from that in the network using the timeasynchronization-based scheduling policy, in the network using the timesynchronization-based scheduling policy, a latency constraint of a pieceof traffic is determined by a single-point bound latency of eachforwarding node through which the traffic flows. The single-point boundlatency of each forwarding node is preset in a network configurationphase. Therefore, in the network that complies with the timesynchronization scheduling policy, that the traffic after being shapedby the shaper satisfies the latency constraint is embodied as ensuringthat the latency DB of the traffic after being shaped by the ingressshaper is not less than the latency constraint requirement DB_Dmd,namely, DB≥DB_Dmd, to ensure that the congestion does not occur eventhrough the traffic is at a forwarding node with a maximum forwardinglatency.

As a specific example, an ingress shaper adapted to the timesynchronization-based network scheduling policy may be, for example, aladder model type, and is applied to a technology including, such as atime-aware shaper (TAS) defined in the IEEE 802.1 Qbv, a cyclic queuingand forwarding (CQF) algorithm defined in the IEEE 802.1 Qch, or thelike, that can provide shaping and scheduling for time-aware datatraffic in the network. In an embodiment, another shaping algorithmadapted to the time synchronization-based network scheduling policy mayalso be selected as required.

In some cases, both the shaper that the traffic flows into and a per-hopforwarding node comply with a same network scheduling policy, andnetwork scheduling parameters used for the forwarding node areconfigured to be the same. In this case, one or more latency-relatedparameters of the shaper are directly configured based on alatency-related network scheduling parameter in the forwarding node, toensure that the traffic satisfies the entire network latencyrequirement. For example, the latency-related shaping parameter may bedirectly configured as a corresponding scheduling parameter of eachforwarding node, or may be configured as an appropriate value greaterthan a corresponding scheduling parameter of each forwarding node. Thelatency-related network scheduling parameter may be, for example, asending period. In some other cases, any quantity of other configurationparameters may also be adjusted as required.

In some other cases, the plurality of forwarding nodes may comply withdifferent network scheduling policies, or different forwarding nodeshave different scheduling parameter configuration. As a result,single-point bound latencies of per-hop forwarding nodes may bedifferent as described above. The one or more latency-related parametersof the shaper are configured based on the maximum value db_(max) of thesingle-point bound latencies of the forwarding nodes. For example, whenthe latency-related shaping parameter is directly and uniquelydetermined based on the single-point bound latency of the forwardingnode, the latency-related shaping parameter may be directly configuredas an appropriate value greater than or equal to db_(max), to ensurethat traffic congestion does not occur on all the forwarding nodes.

To better match an actual forwarding capability of a path through whichthe traffic flows, another corresponding parameter of the shaper may beadaptively adjusted based on another network scheduling parameter of theforwarding node. For example, when the other network schedulingparameter includes a quantity of packets that can be forwarded, aminimum value of the quantity of packets that can be forwarded by eachforwarding node in the sending period may be determined, and is used asa configuration value of the parameter of the quantity of packets thatcan be forwarded by the shaper. A configuration rule of the othernetwork scheduling parameter may be determined based on a networkstructure, a scheduling policy complied with the network, and the like.

In a possible design, one or more parameters unrelated to the latencyconstraint may be further preconfigured, for example, a comparativelyfixed configuration parameter.

The parameter of the shaper, configured using the foregoing variouspossible manners is denoted as a complete configuration parameter setS₁.

In some cases, for example, when the forwarding nodes through which thedifferent traffic flows use different scheduling policies, or schedulingparameters configured for some or all the forwarding nodes are changed,the latency constraint requirement that the traffic needs to satisfy maychange. As a result, for example, the end-to-end latency upper bound ofthe traffic after being shaped based on the configuration parameterdetermined in the method 700 does not satisfy the new service latencyconstraint. In another embodiment, when finding that the traffic afterbeing shaped based on the current configuration parameter cannot satisfythe new latency constraint requirement, the network control node mayfurther adjust the one or more of the configuration parameters of theingress shaper such that the traffic after being shaped based on anadjusted configuration parameter can satisfy a corresponding servicelatency constraint requirement. A method 800 for adjusting aconfiguration parameter of a shaper includes the following content, asshown in FIG. 7 .

S805. Determine a latency constraint requirement DB_Dmd′ of traffic.

It is assumed that the new latency constraint requirement is determinedas DB_Dmd′. As a result, the latency of the traffic after being shapeddoes not satisfy the new latency constraint requirement. Alternatively,in some cases, although the latency constraint requirement DB_Dmd′corresponding to the traffic does not change, expected latencyconstraint satisfaction changes. For example, for a piece of traffic, alatency of the traffic after being shaped based on parameterconfiguration of a current shaper does not reach a minimum latencyallowed for a path through which the traffic flows. In this case, ashaping parameter of the shaper may still be adjusted such that alatency of the traffic after being shaped is further optimized toimprove network transmission efficiency and bandwidth utilization.

The foregoing case is merely used as an example. In an embodiment, thelatency constraint of the traffic may be re-determined according toanother requirement or a preset rule.

S810. Determine a first latency DB₁ of the output traffic after beingshaped based on the configuration parameter of the current shaper.

A calculation manner for the first latency DB₁ of the output trafficafter being shaped based on the configuration parameter of the currentshaper depends on a specific shaping model used by the shaper. Forexample, for a shaper of a CQF or TAS model that supports a timesynchronization scheduling policy, the latency of the traffic afterbeing shaped is a sending period parameter set in the foregoing twomodels. In other possible cases, the latency of the traffic after beingshaped may also be directly obtained or deduced based on anotherparameter. This is related to a specific shaping model selected by theshaper.

S815. Determine whether the first latency DB₁ satisfies the latencyconstraint requirement DB_Dmd′, and if the first latency DB₁ does notsatisfy the latency constraint requirement DB_Dmd′, step S820 isperformed, or if the first latency DB₁ satisfies the latency constraintrequirement DB_Dmd′, the method ends.

Determining whether the first latency DB₁ satisfies the re-determinedlatency constraint requirement DB_Dmd′ is mainly determining whether thetraffic after being shaped based on the current shaping parameterconfiguration can be normally forward on each forwarding node when thereis no congestion, determining, on a basis that the traffic can benormally forwarded and based on the new latency constraint requirementDB_Dmd′, whether optimization needs to be performed on the latency ofthe traffic after being shaped, or the like.

Traffic forwarding in FIG. 2 is still used as an example. In an initialstatus, if the single-point latency of the forwarding node 205 is 3milliseconds (ms), and the single-point latency of the forwarding node207 is 1 s, the traffic 20 should initially satisfy a latency constraintrequirement DB_Dmd=3 ms. The shaper configures the shaping parameteraccordingly such that the first latency DB₁ of the traffic 20 afterbeing shaped is 4 ms, for example, satisfies DB₁>DB_Dmd′. In a possiblecase, if the single-point latency of the forwarding node 207 is adjustedto 5 s because a scheduling parameter of the forwarding node 207changes, the latency constraint DB_Dmd′ of the traffic 20 should bere-determined as max_{3 ms, 5 ms}=5 ms. In this case, the first latencyof the traffic 20 after being shaped based on the initially configuredshaping parameter is DB₁ (=4 s)<DB_Dmd′ (=5 s). In other words, the newlatency constraint DB_Dmd′ is not satisfied. In this way, when thetraffic 20 is transmitted to the forwarding node 207, a single-pointforwarding capability of the forwarding node 207 is exceeded.Consequently, congestion occurs when the traffic 20 is on the forwardingnode 207. Therefore, the step S820 needs to be performed to adjust theshaper parameter configuration such that a second latency of the traffic20 after being shaped satisfies the new latency constraint DB_Dmd′. Inanother possible case, single-point latencies of the forwarding nodes205 and 207 do not change, and the latency constraint DB_Dmd of thetraffic 20 is still 3 ms. In this case, because the first latency of thetraffic 20 after being shaped based on the initial configurationparameter is DB (=4 ms)>DB_Dmd (=3 ms). It may be considered to performthe optimization on the shaper parameter configuration such that asecond latency DB₂ of the traffic 20 after being shaped based on anoptimized configuration parameter is equal to the latency constraintDB_Dmd′. In this case, the latency constraint DB_Dmd′ is DB_Dmd, namely,3 ms. This improves the network transmission efficiency and thebandwidth utilization. The foregoing case is merely used as an example,and another case in which the latency constraint is not satisfied mayalso be applicable.

S820. Adjust at least one configuration parameter of the shaper based onthe latency constraint requirement DB_Dmd′ such that the second latencyDB₂ of the traffic after being shaped by the shaper satisfies thelatency constraint requirement, namely, DB₂≥DB_Dmd′.

In the step S820, a manner of adjusting one or more configurationparameters of the shaper based on the redetermined latency constraintrequirement DB_Dmd′ of the traffic is similar to the parameterconfiguration manner in the step S710. Details are not described hereinagain. It should be noted that, when an operation of adjusting aparameter set of the shaper is performed, any group of parameter set S₁′that can satisfy a constraint of DB₂≥DB_Dmd′ usually needs to bedetermined. The operation may be implemented by adjusting one or moreshaping parameters in the parameter set S₁ of the shaper. A new adjustedparameter set is denoted as S₁′. However, in some cases, for example,when further optimization is expected for latency constraintsatisfaction on a premise that a basic latency constraint requirementDB_Dmd is satisfied, a group of parameter set S₁′ may be directlydetermined such that DB₂=DB_Dmd′. Alternatively, a group of parameterset S₁′ is determined such that DB₂ can be at least closer to DB_Dmd′than that before the shaping parameter is adjusted. For example, for thesecond case shown in the step S815 in which the parameter needs to beoptimized, it may also be considered to adjust the configurationparameter of the shaper such that the second latency DB₂ of the traffic20 after being shaped is at least closer to the latency constraintrequirement DB_Dmd′(3 ms) than that before the adjustment, for example,adjust from 4 s to 3.5 ms. If there are a plurality of shaperparameters, all or some of the parameters may be adjusted based on aparameter meaning, a service scenario, and the like. Alternatively, oneor more of the parameters may be first adjusted based on an adjustmentdifficulty, and if the latency constraint still cannot be satisfied, aplurality of other parameters are adjusted. A specific adjustmentprinciple of the shaper parameter and a quantity of the adjusted shaperparameters can be set as required.

To describe a possible implementation more clearly, the followingdescribes in detail the configuration method 700 shown in FIG. 6B basedon a case in which a shaping parameter of a shaper of a CQF model needsto be configured. The shaper of a CQF model adapts to a timesynchronization-based network scheduling policy.

Forwarding of the traffic 20 in the network structure shown in FIG. 2 isstill used as an example for description. It is assumed that the ingressshaper 203 through which the traffic 20 flows and all the forwardingnodes 205 and 207 through which the traffic 20 flows use a CQF networkscheduling policy. A CQF shaping configuration parameter includes asending period T (ms), a maximum quantity M of packets that can be sentin the sending period and a maximum packet length L (byte). It isassumed that a parameter set S₁ that needs to be configured for theshaper 203 is {T_(s), M_(s), L_(s)}. The method 700′ includes thefollowing content, as shown in FIG. 6B.

S705′. Determine a latency constraint requirement DB_Dmd of traffic in aCQF model-based network.

The forwarding nodes 205 and 207 both use the CQF network schedulingpolicy. A CQF scheduling parameter set S₂₀₅ of the forwarding node 205is {T₂₀₅=100 ms, M₂₀₅=10, L₂₀₅=1500 bytes}. A CQF scheduling parameterset S₂₀₇ of the forwarding node 207 is {T₂₀₇=150 ms, M₂₀₅=15, L₂₀₅=2000bytes}.

The end-to-end latency constraint of the traffic 20 is determined basedon a maximum value of single-point bound latencies of both theforwarding nodes 205 and 207 through which the traffic 20 flows. In theCQF model-based network, a single-point bound latency of a forwardingnode is determined by a configuration parameter the sending period T ina CQF. Therefore, the end-to-end latency constraint requirement DB_Dmdof the traffic 20 is max_{T₂₀₅, T₂₀₇}=max_{100 ms, 150 ms}=150 ms.

S710′. Determine at least one or more configuration parameters of theshaper of the CQF model based on the latency constraint requirementDB_Dmd of the traffic such that the traffic after being shaped by theshaper satisfies the latency constraint.

Based on the latency constraint requirement DB_Dmd=150 ms, one ofshaping parameters of the ingress shaper 203 through which the traffic20 flows may be configured. In other words, the sending period T_(s) is150 ms. In some cases, the sending period T_(s) may also be configuredto any appropriate value greater than 150 ms, to implementzero-congestion transmission of the traffic as much as possible. In someembodiments, the corresponding shaping parameter of the shaper 203 maybe further configured based on another scheduling parameter configuredfor the forwarding nodes 205 and 207, namely, the maximum quantity M ofthe packets that can be sent in the period T and/or the maximum packetlength L. For example, a maximum quantity M_(s) of packets that can besent by the shaper 203 in the period T_(s)=150 ms may be set toM_(s)=min_{M₂₀₅, M₂₀₇}=min_{10, 15}=10, and a maximum packet lengthL_(s) may be set to L_(s)=min_{L₂₀₅, L₂₀₇}=min_{1500 bytes, 2000bytes}=1500 bytes. Therefore, it is ensured that an output rate of thetraffic 20 after being shaped by the shaper 203 does not exceed aminimum forwarding capability of each forwarding node through which thetraffic 20 flows, to avoid the network congestion, fully utilize aforwarding capability of the network, and improve the networktransmission efficiency and service quality at the same time.

In some cases, it may also be considered that each shaping parameter ofthe shaper is not determined strictly based on the foregoing presetmaximum or minimum value calculation principle, but is appropriatelyadjusted within an appropriate and controllable range with reference toa corresponding value determined based on the calculation principle andwith reference to an actual scenario. For example, it may be consideredto configure T_(s), M_(s), and L_(s) as 140 ms, 15, and 1500 bytesrespectively, to balance the overall traffic transmission efficiency andless single-point congestion. This may be necessary in some networkapplications. For example, a service carried by the traffic needs a lowlatency. Therefore, when a packet loss at a low probability is allowedto occur and the traffic flows through many forwarding nodes, it may beconsidered to perform flexible and appropriate selective associationconfiguration on each corresponding shaping parameter of the shaper. Theforegoing case is merely used as an example. A specific configurationmanner can be determined based on an actual requirement and a scenario.

In some possible embodiments, although in the methods 700, and 800 shownin Case 2 and in the specific example of the method 700 using a CQFalgorithm, the latency constraint satisfied by the output traffic afterbeing shaped by the shaper is determined based on the latency of eachforwarding node through which the traffic flows in the network using thetime asynchronization scheduling policy, in a specific application, itusually needs to be considered to use the end-to-end network latencyconstraint DB_Cons of the network for different traffic as aprecondition constraint condition, to ensure that the end-to-end latencyupper bound of the traffic after being shaped by the shaper satisfiesthe end-to-end network latency constraint for a corresponding service.Similar to the step S505 in the method 500, in the network using thetime synchronization network scheduling policy, the end-to-end networklatency constraint DB_Cons of the traffic is also related to the servicetype carried by the traffic, the transmission rate requirement for thetraffic in a specific time period, another possible network datatransmission requirement, or the like. For example, for traffic used tocarry different services, network latency constraints DB_Cons may bedifferent. Details are not described herein. That the end-to-end networklatency constraint DB_Cons of the traffic is used as the preconditionconstraint condition is when the end-to-end latency upper bound DBdetermined based on each forwarding node through which the traffic flowsdoes not exceed the end-to-end latency constraint DB_Cons of the networkfor the traffic, the shaper parameter is configured or adjusted usingthe method 700 or 800. Otherwise, it indicates that the currentforwarding capability of the node through which the traffic flows cannotsatisfy the actual network requirement, the entire network may need tobe upgraded or reconstructed, and the like. Therefore, a configurationoperation or an adjustment operation may not be performed on the shaperparameter temporarily, to save a network bandwidth and reduceunnecessary resource waste. In a possible embodiment, the end-to-endlatency upper bound determined based on the forwarding node throughwhich the traffic flows is a sum of single-point bound latencies db_(r)of the forwarding nodes. In a possible embodiment, prompt informationmay be output to a user, to prompt the user to perform adaptationreconstruction, performance improvement, or the like on the forwardingcapability of the network forwarding node.

In some possible embodiments, for various shaper parameter configurationand adjustment methods in Case 1 and Case 2, one or more triggerconditions may be set for performing a corresponding method. When theone or more trigger conditions are satisfied at the same time, theforegoing various methods are performed on traffic sent by a monitoredsending unit. The trigger condition may include a specific timeinterval, a network monitoring rule, and the like. For example, when atraffic type sent by the sending node 201 including the sending unit 102is fixed or comparatively fixed in a comparatively long period of time,for example, is a type of the traffic 20, the foregoing method may beperformed on the traffic sent at intervals of 60 s. When the traffictype sent by the sending node 201 is flexibly variable, it may beconsidered to set the network monitoring rule as detecting whether thetraffic type is changed. When it is found that the traffic sent by thesending node 201 changes, the foregoing methods are triggered.Alternatively, the network monitoring rule is set as reaching a specificnetwork congestion duration or level. When congestion duration or levelin the network is found to reach the preset value, a network controlnode including the network control unit 101 triggers the foregoingmethods to determine a data flow causing network congestion, to adjust ashaping parameter of a corresponding sending node. Alternatively, toprevent the network congestion, the network monitoring rule is set asdetecting burst increase of the traffic at the network node. When theburst increase of the traffic is found on the network node, theforegoing methods are triggered. Alternatively, in the network using thetime synchronization-based scheduling policy, the foregoing methods maybe triggered when it is detected that the configuration parameters ofthe one or more forwarding nodes in the network change. Alternatively, aplurality of the trigger conditions may be set, for example, when it isdetected that the traffic type changes and a specific time interval issatisfied at the same time, the foregoing methods are triggered, and thelike. In an embodiment, the trigger condition and the trigger rule maybe set as required, and the foregoing trigger condition and rule aremerely examples.

To ensure that the packet loss does not occur as much as possible when anetwork latency occurs, it may be considered to configure comparativelylarge buffer space for the forwarding node in the network, toaccommodate as much as possible, overstocked data of the traffic thatcan satisfy the network latency requirement for the forwarding node. Insome cases, for example, when burst data traffic occurs on theforwarding node, a large amount of data traffic is aggregated within aperiod of time, or buffer space of the forwarding node is limited, astorage resource may need to be appropriately saved on a premise that nocongestion or packet loss occurs as much as possible. Therefore, robustand appropriate buffer space needs to be allocated to the traffic. Forthe network using the time synchronization-based scheduling policydescribed above, because the corresponding scheduling policy is used toensure a per-hop latency bound of the forwarding node, specific bufferspace can be planned and preset for each forwarding node in acomparatively controllable manner. This ensures that the traffic isforwarded without congestion or with less congestion under the per-hopbound latency constraint. However, for the network using the timeasynchronization-based scheduling policy, although the traffic is shapedat the ingress to satisfy the specific latency constraint as much aspossible, the per-hop latency of the traffic at each forwarding nodecannot be pre-determined. As a result, the congestion caused by thelatency of the traffic at each forwarding node cannot be estimated.Therefore, it is difficult to reserve appropriate buffer space inadvance to store overstocked data of the traffic.

An embodiment further provides a device traffic buffer configurationmethod 900 such that a data overstock upper bound of a network node iscalculated based on network calculus as a buffer upper bound of thenetwork node, and a buffer of the network node is configured based onthe buffer upper bound, to save a configuration resource on a premisethat network congestion is avoided as much as possible. The network nodemay be, for example, a per-hop forwarding node through which trafficflows. For example, the method may be used in combination with themethod 500, 600 (600′), 700 (700′), or 800. The method 900 includes thefollowing content, as shown in FIG. 8 .

S910. Determine an arrival curve α_(n)(t) and a service curve β_(n)(t)for the traffic at a forwarding node.

The arrival curve α_(n)(t) for the traffic at the current forwardingnode may be obtained through calculation based on an arrival curveα_(n−1)(t) and a service curve β_(n−1) (t) at a previous-hop forwardingnode of the current forwarding node. Specifically,α_(n)(t)=sup_{u≥0}{α_(n−1)(t+u)−β_(n−1)(u)}. In an embodiment, at anygiven moment, all u≥0 is traversed to solve a supremum value ofα_(n−1)(t+u)−β_(n−1)(u). The supremum value is used as a return resultof the arrival curve α_(n)(t) at the current forwarding node at themoment t. u is an intermediate variable, and may be any value greaterthan or equal to 0. sup_represents calculating a supremum of a set. Forexample, sup_{E} represents calculating a supremum of a set E, namely, aminimum element of all other elements greater than or equal to E. Theminimum element is not necessarily in the set E. The service curve forthe traffic at the current forwarding node is determined based on aforwarding capability of the node. For example, the service curve may beaffected by factors such as a scheduling mechanism followed by the node,a maximum packet length, and a port rate, and may be expressed as β_(n)(t).

The arrival curve α_(n)(t) and the service curve β_(n)(t) of the trafficflowing through the current forwarding node may be calculated in realtime when a buffer of the node needs to be estimated, or calculationresults of a single-point arrival curve and a single-point service curvemay be pre-stored when the upper latency bound of the traffic iscalculated. When the buffer of the node needs to be estimated,corresponding storage content is directly obtained. For details, referto corresponding descriptions in the step S610.

S915. Determine a buffer upper bound v_(n)(α, β) of the forwarding nodebased on the arrival curve α_(n)(t) and the service curve β₁(t).

The data overstock upper bound of the forwarding node, namely, thebuffer upper bound ν_(n)(α, β) may be calculated based on ν_(n)(α,β)=Max_Vdis (α_(n)(t), β_(n)(t))=sup_{t≥0}{α_(n)(t)−β_(n)(t)}. In otherwords, all t≥0 are traversed, to solve a supremum value ofα_(n)(t)−β_(n)(t). The supremum value is used as a calculation result ofthe buffer upper bound ν_(n)(α, β) of the current forwarding node. Thecalculation result is a maximum vertical distance between the arrivalcurve α_(n)(t) and the service curve β_(n)(t) at the forwarding node.

S920. Based on the determined buffer upper bound v_(n)(α, β), determinea buffer allocated to the traffic.

Based on the determined buffer upper bound ν_(n)(α, β), the bufferallocated to the traffic is determined. The allocated buffer is greaterthan or equal to the buffer upper bound ν_(n)(α, β). In consideration offactors such as a hardware implementation or a storage policy, somebuffer space may be lost during actual data storage. During bufferallocation, specific tolerance may be appropriately added based on thebuffer upper bound ν_(n)(α, β), to cope with a storage space loss at apossible implementation layer.

ν_(n)(α, β) obtained through calculation using the foregoing method is abuffer upper bound of a single flow, and a buffer size allocated basedon the buffer upper bound is also for the single flow. In an embodiment,one forwarding node usually needs to carry multi-flow forwarding. Forexample, summation calculation may be performed based on a bufferallocated to each single flow, to determine an overall buffer space sizerequired by the forwarding node to implement non-congestion forwardingof all traffic flows, and allocate corresponding buffer space and/or acorresponding buffer location based on an actual required buffer foreach single flow.

In a network using time asynchronization-based scheduling policy, insome cases, due to factors such as network transmission or a processingcapability of the forwarding node, a comparatively obvious latency mayoccur when the traffic flows through each forwarding node, and thelatency may be usually transmitted hop by hop. As latencies accumulate,a traffic burst occurs on a forwarding node. As a result, a congestionpacket loss occurs. To avoid occurrence of the foregoing case, in apossible embodiment, a corresponding per-hop shaper may be configured oneach forwarding node, to perform per-hop shaping and regulation on thetraffic. The per-hop network shaper may be configured at a trafficoutput position of the current forwarding node, to shape output trafficforwarded by the current forwarding node before the traffic is sent to anext forwarding node. Different from an ingress shaper, the per-hopshaper usually does not shape to-be-forwarded traffic in differentforms. Instead, before forwarding traffic, the per-hop shaper normalizesthe traffic based on a shape when the traffic enters the ingress.Therefore, the per-hop shaper and the ingress shaper usually support asame shaping model, for example, support a single-bucket model. However,for transmission of a same piece of traffic, the per-hop shaper and theingress shaper support the same shaping model, and may have a sameconfiguration parameter or different parameters. A specific parametervalue can be configured based on an actual scenario. The per-hop shapermay be, for example, the independent shaper 106 shown in FIG. 1 .Alternatively, the per-hop shaper may be used as a unit in acorresponding forwarding node to implement a per-hop shaping function,for example, integrated into the forwarding node 205 and/or theforwarding node 207 shown in FIG. 2 .

In a possible embodiment, for each forwarding node that forwards thetraffic, shaping parameter configuration of a per-hop shaper used foreach forwarding node may be the same as parameter configuration of theingress shaper. After the traffic is shaped by the per-hop shaper, anarrival curve α_(n)′(t) output at the forwarding node is the same as theinitial curve (t) after shaping is performed at an ingress. In anembodiment, α_(n)′(t)=(t), where n=1, . . . , N, and N is a quantity offorwarding nodes of which the traffic flows through the trafficforwarding path. In another possible embodiment, the shaping parameterconfiguration of the per-hop shaper used for each forwarding node mayalso be configured as required. In this case, arrival curves α_(n)′(t)output at all forwarding nodes may be different from each other, and mayalso be different from the initial curve σ(t) after the shaping isperformed at the ingress. It should be noted that, after the traffic isshaped by the per-hop shaper on the forwarding node, the output arrivalcurve α_(n)′(t) is usually different from an arrival curve α_(n)(t)directly output at a same forwarding node without performing per-hopshaping but performing the shaping only at the ingress, namely,α_(n)′(t)≠α_(n)(t). In some special cases, α_(n)′(t) may be the same asα_(n)(t) in the calculation result, namely, α_(n)′(t)=α_(n)(t).

When the per-hop shaper is disposed, because the service curve at eachforwarding node is related only to the forwarding capability of eachforwarding node, the service curve at each forwarding node is notaffected by the per-hop shaping. In other words, the service curveβ_(n)′(t) at each forwarding node on which the per-hop shaper isconfigured is the same as the service curve β_(n)(t) when the shaping isperformed only at the ingress, namely, β_(n)′(t)=β_(n)(t).

Based on the determined α_(n)′(t) and β_(n)′(t) at each forwarding node,a per-hop latency db_(n) of the current forwarding node may be obtainedas Max_Hdis (α_(n)′(t), β_(n)′(t)) through calculation. In addition, anend-to-end bound latency DB of the traffic may be determined as db₁+ . .. , db_(N) accordingly after the per-hop shaping and regulation areperformed, where N is the quantity of forwarding nodes through which thetraffic flows. Therefore, the per-hop shaping and the regulation of theper-hop shaper ensures a single-point latency bound in a timeasynchronization-based network to some extent. In some cases, forexample, when the configuration parameter of each per-hop shaper isdifferent from the configuration parameter of the ingress shaper, theparameter of the ingress shaper may be adjusted based on the determinedend-to-end bound latency DB. For a specific adjustment manner, refer tothe method 600. It should be noted that the foregoing describes a casein which the per-hop shaper is configured on each forwarding node. In anembodiment, per-hop shapers may also be configured on some selectedforwarding nodes as required. For example, based on historicalmonitoring data, the per-hop shapers are configured on key forwardingnodes that are prone to the packet loss or latency variation, to avoidthe network congestion and save a network resource as much as possible.

The foregoing describes disposition of the per-hop shaper and the methodfor determining the latency in a single-flow scenario. In an embodiment,multi-flow aggregation may occur at each forwarding node. The multi-flowaggregation indicates a case in which a plurality of pieces of trafficof a same form are aggregated at a same forwarding node such that theplurality of pieces of traffic are forwarded after being aggregated bythe forwarding node. For example, a piece of traffic A, a piece oftraffic B, and a piece of traffic C of the single-bucket model reach thesame forwarding node. An arrival curve for the traffic A isα₁(t)=b₁+r₁t. An arrival curve for the traffic B is α₂(t)=b₂+r₂t. Anarrival curve for the traffic C is α₃(t)=b₃+r₃t. Values of parametersb₁, b₂, and b₃ can be the same, partially the same, or all the same.Values of parameters r₁, r₂, and r₃ can be the same, partially the same,or all the same. After receiving the traffic A, the traffic B, and thetraffic C, the forwarding node aggregates the traffic A, the traffic B,and the traffic C into one aggregation flow satisfying a single-bucketform. For the multi-flow aggregation case, after the aggregation flow isshaped by the per-hop shaper corresponding to the forwarding node, theoutput arrival curve during shaping is determined based on anaggregation arrival curve for the aggregation flow formed by theplurality of pieces of traffic. For example, when a shaping model of theper-hop shaper is a linear model, the aggregation arrival curve isα_(nm)′(t)=Σ₁ ^(M) α_(n) ^(i)(t), where n=1, . . . , N, N is thequantity of forwarding nodes of which the traffic flows through theforwarding path, M is a quantity of single flows aggregated on theforwarding node, α_(n) ^(i)(t) is an arrival curve for a single flow onan n^(th) forwarding node before an i^(th) piece of traffic isaggregated. For a calculation manner of α_(n) ^(i)(t), refer to theforegoing case for the single flow. For example, when the traffic A, thetraffic B, and the traffic C are aggregated into the aggregation flow ata second forwarding node, the aggregation arrival curve obtained afterthe three pieces of single flows are aggregated is α_(nm)′(t)Σ₁ ³α₂^(i)(t)=(b₁+b₂+b₃)+(r₁+r₂+r₃) t.

For the per-hop shaping on the multi-flow aggregation, because theservice curve at each forwarding node is related only to the forwardingcapability of each forwarding node, the service curve at each forwardingnode is not affected by the per-hop shaping. In other words, the servicecurve β_(nm)′(t) of each forwarding node on which the per-hop shaper isconfigured is the same as the service curve β_(n)(t) when the shaping isperformed only at the ingress, namely, β_(nm)′(t)=β_(n)(t). Based on thedetermined α_(nm)′(t) and β_(nm)′(t) at each forwarding node, amulti-flow per-hop latency db_(nm) of the current forwarding node may beobtained as Max_Hdis (_((nm)′(t)−_((nm)′(t)) through calculation. Inaddition, the end-to-end bound latency DB of the traffic may bedetermined as Σ₁ ^(N) db_(n) accordingly after the per-hop shaping andregulation are performed, where N is the quantity of forwarding nodesthrough which the traffic flows.

An embodiment further provides a network configuration method 1000, asshown in FIG. 9 . It should be noted that a network shaper described inthe method 1000 is usually configured at a traffic ingress, for example,a position of a network edge node, and is configured to shape traffic atthe ingress, for example, the ingress shaper 104 shown in FIG. 1 . Themethod 1000 may be performed, for example, by a network managementdevice in a network. The method 1000 includes the following content.

S1005. Determine an end-to-end latency upper bound DB of data trafficbetween two end nodes.

FIG. 2 is still used as an example, and the two end nodes arerespectively the sending node 201 and the receiving node 209. In anetwork using a time asynchronization-based scheduling policy, theend-to-end latency upper bound between the sending node 201 and thereceiving node 209 may be obtained through calculation based on anetwork calculus algorithm. For example, any one of Manner 1 to Manner 4for calculating the end-to-end latency upper bound based on the networkcalculus algorithm is used for determining, or refer to the step S510 inthe method 500, or the step S610 (S610′) in the method 600 (600′).

In a network using a time synchronization-based scheduling policy, theend-to-end latency upper bound is determined based on single-point boundlatencies of forwarding nodes between the two end nodes. The end-to-endlatency upper bound is determined based on a sum of the single-pointbound latencies of the forwarding nodes between the two end nodes. Forexample, summation may be performed on single-point bound latencies ofthe forwarding nodes 205 and 207 between the sending node 201 and thereceiving node 209, to obtain the end-to-end latency upper bound throughcalculation.

S1010. Determine an end-to-end latency constraint DB_Cons of the datatraffic between the two end nodes.

The end-to-end latency constraint DB_Cons of the traffic is usuallyrelated to a service type carried by the traffic. Different traffic maycarry different service types. The different service types may also havedifferent latency constraints in the network. In addition to beingrelated to the service type carried by the traffic, the end-to-endlatency constraint DB_Cons may further be related to a transmission raterequirement for the traffic in a specific time period, or anotherpossible network data transmission requirement. For a specific example,refer to the step S505 in the method 500.

In some cases, the end-to-end latency constraint of the traffic mayfurther need to be re-determined as DB_Cons′. For example, a servicetype carried by traffic flowing into a shaper may change, or althoughthe service type carried by the traffic does not change, a latencyrequirement for a same service type changes. In this case, the newend-to-end latency constraint is determined as DB_Cons′. For example,refer to the step S605 (S605′) in the method 600 (600′).

S1015. Determine, based on the end-to-end latency upper bound DB and theend-to-end latency constraint DB_Cons, for a first network shaper, atleast one configuration parameter that satisfies the end-to-end latencyconstraint.

In the network using the time asynchronization-based scheduling policy,when configuring a parameter of the first network shaper, the networkmanagement device may determine the end-to-end latency constraintDB_Cons of the traffic based on the service type carried by the traffic.The end-to-end latency upper bound may be represented as a latency upperbound function, and may be represented as the latency upper boundfunction generated using an arrival curve function and a service curvefunction that are based on the network calculus algorithm. A shaper of asingle bucket model is used as an example. The end-to-end latency upperbound is expressed as a latency upper bound function includingparameters b and r. A parameter b represents a maximum burst sizeallowed by traffic output by the shaper. A parameter r represents anaverage output rate of the traffic output by the shaper. Based on thelatency upper bound function including the parameter b and a value ofthe end-to-end latency constraint DB_Cons, a value b1 of theconfiguration parameter b when the end-to-end latency constraint DB_Consis satisfied can be calculated. Accordingly, b1 is determined as one ofconfiguration parameter values of the shaper of the single bucket model.In a possible embodiment, the network management device may furtherdetermine the configuration parameter r of the shaper. The configurationparameter r may be, for example, determined to be greater than or equalto an average input rate of the traffic before being shaped, and lessthan or equal to a value r₁ in a minimum value interval of service ratesof all forwarding nodes between the two end nodes. For example, refer tothe step S515 in the method 500, or the step S615 (S615′) and the step620 (620′) in the method 600 (600′).

In the network using the time synchronization-based scheduling policy, asingle-point forwarding latency bound of the traffic at each forwardingnode can be ensured. Therefore, the end-to-end latency upper bound DBmay be determined based on each single-point bound latency of eachforwarding node between the two end nodes. For example, the summationmay be performed on single-point bound latencies of all the forwardingnodes, to determine the end-to-end latency upper bound DB. Theend-to-end network latency constraint DB_Cons of the traffic is alsorelated to the service type carried by the traffic, the transmissionrate requirement for the traffic in the specific time period, anotherpossible network data transmission requirement, or the like. Likewise,for example, the end-to-end latency constraint DB_Cons of the trafficmay be determined based on the service type carried by the traffic. Onlywhen the determined end-to-end latency upper bound DB satisfies theend-to-end network latency constraint DB_Cons, configuration oradjustment on a parameter of the shaper is triggered. Otherwise, itindicates that the forwarding capability of the current node of whichthe traffic flows through on a path cannot satisfy the actual networkrequirement. There is no need to perform a configuration or adjustmentoperation on the parameter of the shaper.

When that the end-to-end latency upper bound DB satisfies the end-to-endnetwork latency constraint DB_Cons is determined, one or moreconfiguration parameters of the shaper may be determined based on thesingle-point bound latency of each forwarding node. A shaper of a CQFmodel is used as an example. The network management device maydetermine, based on the single-point bound latencies of all theforwarding nodes between the two end nodes, a maximum value of all thesingle-point bound latencies, and determine, based on the maximum value,for the shaper, a sending period that satisfies the end-to-end latencyconstraint. The sending period is one configuration parameter of theshaper. The network management device may further determine anotherconfiguration parameter of the shaper. The other configuration parametermay include, for example, a maximum quantity of packets that can be sentin the configured sending period and/or a maximum packet length. Fordetails, refer to the method 700 (700′) or the method 800.

S1020. Configure the data traffic for the first network shaper based onthe at least one configuration parameter.

The network management device may configure the data traffic for thefirst network shaper based on all the determined configurationparameters.

In some possible embodiments, as described in the step S910, theend-to-end latency constraint of the traffic may change. For example,when a traffic constraint requirement for a same service type changes,or a service type in another piece of traffic that flows into the shaperchanges, a new end-to-end latency constraint DB_Cons′ needs to bedetermined in this case. Consequently, after shaping is performed basedon the current configuration parameter of the first network shaper, theend-to-end latency upper bound DB does not satisfy the end-to-endlatency constraint DB_Cons′. The configuration parameters of the shaperneed to be adaptively adjusted. The single-bucket model-based shapermodel is used as an example, a value b₂ of the configuration parameter bmay be re-determined at least based on the new end-to-end latencyconstraint DB_Cons′.

In a possible embodiment, the method 1000 further includes thefollowing.

S1025. Determine configuration parameters of one or more second networkshapers respectively corresponding to one or more forwarding nodesbetween the two end nodes, where the configuration parameters of the oneor more second network shapers are the same as correspondingconfiguration parameters of the first network shaper such that per-hopregulation is performed on the data traffic that flows through the oneor more forwarding nodes.

In the network using the time asynchronization-based scheduling policy,a corresponding per-hop shaper may be configured on each forwarding nodein some cases, to perform per-hop shaping and regulation on the traffic.This avoids a traffic burst on a forwarding node and a congestion packetloss caused with accumulation of the latencies. The second networkshaper is the per-hop shaper, and may be configured at a traffic outputposition of a current forwarding node, to shape output traffic forwardedby the current forwarding node before the traffic is sent to a nextforwarding node. For transmission of a same piece of traffic, the secondnetwork shaper and the first network shaper usually support a sameshaping model. Specific configuration parameters may be the same, or maybe different. In a possible embodiment, the network management device isconfigured to configure a shaping parameter of the second network shaperused for each forwarding node to be the same as the parameterconfiguration of the first network shaper. In consideration thatmulti-flow aggregation may also occur on each forwarding node, thenetwork management device may also determine a multi-flow per-hoplatency of the current forwarding node based on an arrival curvefunction and a service curve function that are formed on a correspondingforwarding node after the multi-flow aggregation, and configure theconfiguration parameter of the second network shaper accordingly.

In a possible embodiment, the method 1000 further includes thefollowing.

S1030. Determine a buffer upper bound of the current forwarding nodebased on an arrival curve function and a service curve function at aprevious forwarding node through which the data traffic flows, anddetermine a buffer of the current forwarding node based on the bufferupper bound, where the buffer is configured to temporarily store thedata traffic in the current forwarding node.

In the network using the time asynchronization-based scheduling policy,it may be considered to configure appropriate buffer space for eachforwarding node in the network, without excessively wasting a storageresource, to avoid or alleviate the packet loss caused by the latency.Therefore, the network management device may calculate, based on thenetwork calculus, the data overstock upper bound of the device as theupper bound. The buffer upper bound may be obtained through calculationbased on a maximum vertical distance between the arrival curve α_(n)(t)and the service curve β_(n)(t) of the forwarding node. The networkmanagement device may configure the buffer of the forwarding node basedon the determined buffer upper bound.

An embodiment further provides a network configuration device 1100, asshown in FIG. 10 . The device 1100 includes a first determining unit1110, a second determining unit 1120, a parameter determining unit 1130,and a shaper configuration unit 1140. Each unit may be configured tocorrespondingly perform the method 500, 600 (600′), 700 (700′), 800,900, or 1000.

The first determining unit 1110 is configured to determine an end-to-endlatency upper bound of data traffic between two end nodes.

The second determining unit 1120 is configured to determine anend-to-end latency constraint of the data traffic between the two endnodes.

The parameter determining unit 1130 is configured to determine, based onthe end-to-end latency upper bound and the end-to-end latencyconstraint, for a first network shaper, at least one configurationparameter that satisfies the end-to-end latency constraint.

The shaper configuration unit 1140 is configured to configure the datatraffic for the first network shaper based on the at least oneconfiguration parameter.

In a possible embodiment, the end-to-end latency upper bound isrepresented as a latency upper bound function. The first determiningunit 1110 of the device 1100 is further configured to generate thelatency upper bound function using an arrival curve function and aservice curve function that are based on a network calculus algorithm.The end-to-end latency upper bound is represented as a latency upperbound function including a first variable. The first variable representsa maximum burst size allowed by traffic output by the first networkshaper. The first variable belongs to the at least one configurationparameter. For example, a corresponding execution part in the method500, 600 (600′), or 1000 is executed.

In a possible embodiment, the parameter determining unit 1130 is furtherconfigured to calculate a value of the first variable under a conditionthat the end-to-end latency upper bound satisfies the end-to-end latencyconstraint. The parameter determining unit 1130 is further configured todetermine a first rate. The first rate is an average output rate of thedata traffic on the first network shaper. The first rate is greater thanor equal to an average input rate of the data traffic and is less thanor equal to a minimum value of service rates of all forwarding nodesbetween the two end nodes. The first rate belongs to the at least oneconfiguration parameter. For example, the corresponding execution partin the method 500, 600 (600′), or 1000 is executed.

In a possible embodiment, the shaper configuration unit 1140 is furtherconfigured to determine configuration parameters of one or more secondnetwork shapers respectively corresponding to one or more forwardingnodes between the two end nodes. The configuration parameters of the oneor more second network shapers are the same as correspondingconfiguration parameters of the first network shaper such that per-hopregulation is performed on the data traffic that flows through the oneor more forwarding nodes. For example, the corresponding execution partin the method 1000 is executed.

In a possible embodiment, the device 1100 further includes a bufferconfiguration unit 1150. The buffer configuration unit 1150 isconfigured to determine a buffer upper bound of the current forwardingnode based on an arrival curve function and a service curve function ata previous forwarding node through which the data traffic flows, anddetermine a buffer of the current forwarding node based on the bufferupper bound. The buffer is configured to temporarily store the datatraffic in the current forwarding node. For example, the correspondingexecution part in the method 900, or 1000 is executed.

In a possible embodiment, that the second determining unit 1120determines the end-to-end latency constraint of the data traffic betweenthe two end nodes includes determining the end-to-end latency upperbound based on single-point bound latencies of all forwarding nodesbetween the two end nodes. For example, a corresponding execution partin the method 700 (700′), 800, or 1000 is executed.

In a possible embodiment, that the parameter determining unit 1130determines, based on the end-to-end latency upper bound and theend-to-end latency constraint, for the first network shaper, the atleast one configuration parameter that satisfies the end-to-end latencyconstraint includes determining that the end-to-end latency upper boundsatisfies the end-to-end latency constraint, when the end-to-end latencyupper bound satisfies the end-to-end latency constraint, determining amaximum value of all the single-point bound latencies based on thesingle-point bound latencies of all the forwarding nodes between the twoend nodes, and determining, based on the maximum value of all thesingle-point bound latencies, for the first network shaper, aconfiguration parameter that satisfies the end-to-end latencyconstraint. For example, the configuration parameter is a sendingperiod. Another configuration parameter in the at least oneconfiguration parameter further includes a maximum quantity of packetsthat can be sent in the configured sending period and/or a maximumpacket length. For example, the corresponding execution part in themethod 700 (700′), 800, or 1000 is executed.

An embodiment further provides a network configuration device 1200, asshown in FIG. 11 . The device 1200 includes a memory 1210, a processor1220, and one or more network interfaces 1230. The one or more networkinterfaces 1230 are configured to receive information from a networkand/or send information that needs to be sent by a network managementsystem to the network. The network interface 1230 may send, to thememory 1210 and the processor 1220, information received from thenetwork, or send, to the network, information processed or generated bythe processor 1220. The information may be, for example, a packetcarrying data traffic that needs to be forwarded. The memory 1210 isconfigured to store a computer-readable instruction. The processor 1220is configured to execute the readable instruction stored in the memory1210 such that the device 1200 performs the method 500, 600 (600′), 700(700′), 800, 900, or 1000. For specific execution content andimplemented functions, refer to the descriptions of the foregoingmethods. Details are not described herein again. In an example, when thedevice 1200 performs the method 900, the computer-readable instructionin the memory 1210 may include a first determining unit 1211, a seconddetermining unit 1213, a parameter determining unit 1215, and a shaperconfiguration unit 1217.

An embodiment further provides a computer-readable storage medium or acomputer program product configured to separately store a correspondingcomputer program. The computer program is used to perform the methods500, 600 (600′), 700 (700′), 800, 900, and 1000.

It should be understood that, in this embodiment, a processor may be acentral processing unit (CPU), one or more network processors (NPs), ora combination of a CPU and an NP. The processor may be alternatively oneor more programmable logic devices (PLD) or a combination thereof. ThePLD may be a complex PLD (CPLD), a field-programmable gate array (FPGA),generic array logic (GAL), or any combination of the CPLD, the FPGA, orthe GAL.

A memory may be one memory, or may include a plurality of memories. Thememory includes a volatile memory, such as a random-access memory (RAM).The memory may further include a non-volatile memory, such as aread-only memory (ROM), a flash memory, a hard disk drive (HDD), or asolid-state drive (SSD). The memory may further include a combination ofthe foregoing types of memories.

A network interface may be an Ethernet network interface, or may beanother type of network interface.

It may be understood that a structural composition of the networkconfiguration device 1100 is merely a possible example. In anembodiment, the device 1100 may include any quantity of interfaces,processors, memories, and the like.

It should be understood that sequence numbers of the foregoing processesdo not mean execution sequences in various embodiments. The executionsequences of the processes should be determined according to functionsand internal logic of the processes, and should not be construed as anylimitation on the implementation processes of the embodiments.

A person of ordinary skill in the art may be aware that, in combinationwith the examples described in the embodiments disclosed in thisspecification, modules and method steps may be implemented by electronichardware, or a combination of computer software and electronic hardware.Whether the functions are performed by hardware or software depends onparticular applications and design constraint conditions of thetechnical solutions. A person skilled in the art may implement thedescribed functions for each specific application using differentmethods.

All or some of the foregoing embodiments may be implemented usingsoftware, hardware, firmware, or any combination thereof. When softwareor firmware is used to implement the embodiments, all or some of theembodiments may be implemented in a form of a computer program product.The computer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on thecomputer, the procedure or functions according to the embodiments areall or partially generated. The computer may be a general-purposecomputer, a dedicated computer, a computer network, or otherprogrammable apparatuses. The computer instructions may be stored in acomputer-readable storage medium, or may be transmitted from acomputer-readable storage medium to another computer-readable storagemedium. For example, the computer instructions may be transmitted from awebsite, computer, server, or data center to another website, computer,server, or data center in a wired (for example a coaxial cable, anoptical fiber, or a twisted pair) or wireless (for example infrared, ormicrowave) manner. The computer-readable storage medium may be anyusable medium accessible by a computer, or a data storage device, suchas a server or a data center, integrating one or more usable media. Theusable medium may be a magnetic medium (for example, a floppy disk, ahard disk, or a magnetic tape), an optical medium (for example, anoptical disc), a semiconductor medium (for example, an SSD), or thelike. All parts in this specification are described in a progressivemanner, and for same or similar parts in the embodiments, refer to theseembodiments. Especially, the device embodiment is basically similar to amethod embodiment, and therefore is described briefly, for relatedparts, refer to descriptions in the method embodiment.

In summary, it should be noted that what is described above is merelyexample embodiments of the technical solutions, but is not intended tolimit the protection scope of this disclosure.

What is claimed is:
 1. A method comprising: determining an end-to-endlatency bound of data traffic between two end nodes; and determining,based on the end-to-end latency bound, a first configuration parameterthat satisfies an end-to-end latency constraint for a first networkshaper, wherein the end-to-end latency constraint is of the datatraffic.
 2. The method of claim 1, further comprising configuring thefirst network shaper for the data traffic based on the firstconfiguration parameter.
 3. The method of claim 1, wherein theend-to-end latency bound is based on a latency bound function, andwherein the method further comprises generating the latency boundfunction using an arrival curve function and a service curve functionthat are based on a network calculus algorithm.
 4. The method of claim3, wherein the latency bound function comprises a first variablerepresenting a maximum burst size of traffic output from the firstnetwork shaper and belonging to the first configuration parameter. 5.The method of claim 4, further comprising calculating a value of thefirst variable in response to the end-to-end latency bound satisfyingthe end-to-end latency constraint.
 6. The method of claim 3, furthercomprising: determining a buffer bound of a current forwarding nodebased on the arrival curve function and the service curve function at aprevious forwarding node through which the data traffic flowed; anddetermining a buffer of the current forwarding node based on the bufferbound.
 7. The method of claim 1, further comprising determining a firstrate that is an average output rate of the data traffic on the firstnetwork shaper, is greater than or equal to an average input rate of thedata traffic, is less than or equal to a minimum value of service ratesof forwarding nodes between the two end nodes, and belongs to the firstconfiguration parameter.
 8. The method of claim 1, further comprisingdetermining a second configuration parameter of a second network shapercorresponding to forwarding nodes between the two end nodes, wherein thesecond configuration parameter is the same as the first configurationparameter.
 9. The method of claim 1, further comprising furtherdetermining the end-to-end latency bound based on single-point boundlatencies of forwarding nodes between the two end nodes.
 10. The methodof claim 9, further comprising: determining that the end-to-end latencybound satisfies the end-to-end latency constraint; determining a maximumvalue of the single-point bound latencies between the two end nodesbased on the single-point bound latencies and in response to theend-to-end latency bound satisfying the end-to-end latency constraint;and further determining the first configuration parameter based on themaximum value.
 11. The method of claim 10, wherein the firstconfiguration parameter is a sending period, wherein the method furthercomprises determining, based on the end-to-end latency bound and themaximum value, a second configuration parameter that satisfies theend-to-end latency constraint, wherein the second configurationparameter comprises a maximum quantity of packets that can be sent inthe sending period or comprises a maximum packet length.
 12. The methodof claim 1, wherein the end-to-end latency bound comprises an upperbound.
 13. A device comprising: a memory configured to storeinstructions; and a processor coupled to the memory and configured toexecute the instructions to: determine an end-to-end latency bound ofdata traffic between two end nodes; and determine, based on theend-to-end latency bound, a first configuration parameter that satisfiesan end-to-end latency constraint for a first network shaper, wherein theend-to-end latency constraint is of the data traffic.
 14. The device ofclaim 13, wherein the processor is further configured to execute theinstructions to configure the first network shaper for the data trafficbased on the first configuration parameter.
 15. The device of claim 13,wherein the end-to-end latency bound is based on a latency boundfunction, and wherein the processor is further configured to execute theinstructions to generate the latency bound function using an arrivalcurve function and a service curve function that are based on a networkcalculus algorithm.
 16. The device of claim 15, wherein the latencybound function comprises a first variable representing a maximum burstsize of traffic output from the first network shaper, and wherein thefirst variable belongs to the first configuration parameter.
 17. Thedevice of claim 16, wherein the processor is further configured toexecute the instructions to calculate a value of the first variableunder a condition that the end-to-end latency bound satisfies theend-to-end latency constraint.
 18. The device of claim 15, wherein theprocessor is further configured to execute the instructions to:determine a buffer bound of a current forwarding node based on thearrival curve function and the service curve function at a previousforwarding node through which the data traffic flows; and determine abuffer of the current forwarding node based on the buffer bound.
 19. Thedevice of claim 13, wherein the processor is further configured toexecute the instructions to determine a first rate that is an averageoutput rate of the data traffic on the first network shaper, is greaterthan or equal to an average input rate of the data traffic, is less thanor equal to a minimum value of service rates of forwarding nodes betweenthe two end nodes, and belongs to the first configuration parameter. 20.The device of claim 13, wherein the processor is further configured toexecute the instructions to determine a second configuration parameterof a second network shaper corresponding to forwarding nodes between thetwo end nodes, and wherein the second configuration parameter is thesame as the first configuration parameter.
 21. The device of claim 13,wherein the processor is further configured to execute the instructionsto determine the end-to-end latency bound based on single-point boundlatencies of forwarding nodes between the two end nodes.
 22. The deviceof claim 21, wherein the processor is further configured to execute theinstructions to: determine that the end-to-end latency bound satisfiesthe end-to-end latency constraint; determine a maximum value of thesingle-point bound latencies between the two end nodes based on thesingle-point bound latencies and in response to the end-to-end latencybound satisfying the end-to-end latency constraint; and furtherdetermine the first configuration parameter based on the maximum value.23. The device of claim 13, wherein the end-to-end latency boundcomprises an upper bound.
 24. A computer program product comprisinginstructions that are stored on a non-transitory computer-readablemedium and that, when executed by a processor, cause a device to:determine an end-to-end latency bound of data traffic between two endnodes; and determine, based on the end-to-end latency bound, a firstconfiguration parameter that satisfies an end-to-end latency constraintfor a first network shaper, wherein the end-to-end latency constraint isof the data traffic.